anchor.diff:      {ok,N2} = inc_counter(F, 0, 1),
       {ok,N3} = set_counter(F, 0, 5),
       {ok,N4} = set_counter(F, 0, 8),
  +    {ok,N5} = read_counter(F, 0),
       close_counters(F),
       file:delete("/dev/shm/temp.bin"),
       ?assertEqual(0, N1),
       ?assertEqual(1, N2),
       ?assertEqual(2, N3),
  -    ?assertEqual(5, N4).
  +    ?assertEqual(5, N4),
  +    ?assertEqual(8, N5).
   
   shared_test() ->
       F = fun(Owner) ->
  
positive.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]).
  
  -export_type([resource/0, open_option/0]).
  
  
negative.code: 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).
  
  