anchor.diff:  set_counter({MFile, NumCnts}, CounterNumber, Value)
           when NumCnts > CounterNumber, is_integer(CounterNumber), is_integer(Value) ->
       patomic(MFile, 16+CounterNumber*8, xchg, Value).
  -    
  +
  +read_counter({MFile, NumCnts}, CounterNumber)
  +        when NumCnts > CounterNumber, is_integer(CounterNumber) ->
  +    patomic_read_integer(MFile, 16+CounterNumber*8).
     
   -ifdef(EUNIT).
   
  
positive.code:     {ok,N2} = inc_counter(F, 0, 1),
      {ok,N3} = set_counter(F, 0, 5),
      {ok,N4} = set_counter(F, 0, 8),
      close_counters(F),
      file:delete("/dev/shm/temp.bin"),
      ?assertEqual(0, N1),
      ?assertEqual(1, N2),
      ?assertEqual(2, N3),
      ?assertEqual(5, N4).
  
  shared_test() ->
      F = fun(Owner) ->
  
negative.code:     patomic/4, patomic_read_integer/2, patomic_write_integer/3
  ]).
  -export([open_counters/1, open_counters/2, close_counters/1]).
  -export([inc_counter/2, inc_counter/3, set_counter/3, read_counter/2]).
  
  -export_type([resource/0, open_option/0]).
  
  