gproc.hrl 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. %% ``The contents of this file are subject to the Erlang Public License,
  2. %% Version 1.1, (the "License"); you may not use this file except in
  3. %% compliance with the License. You should have received a copy of the
  4. %% Erlang Public License along with this software. If not, it can be
  5. %% retrieved via the world wide web at http://www.erlang.org/.
  6. %%
  7. %% Software distributed under the License is distributed on an "AS IS"
  8. %% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
  9. %% the License for the specific language governing rights and limitations
  10. %% under the License.
  11. %%
  12. %% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
  13. %% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
  14. %% AB. All Rights Reserved.''
  15. %%
  16. %% @author Ulf Wiger <ulf@wiger.net>
  17. %%
  18. %% gproc.hrl: Common definitions
  19. -define(TAB, gproc).
  20. -type type() :: n | p | c | a.
  21. -type scope() :: l | g.
  22. -type context() :: {scope(),type()} | type().
  23. -type sel_type() :: n | p | c | a |
  24. names | props | counters | aggr_counters.
  25. -type sel_var() :: '_' | atom().
  26. -type keypat() :: {sel_type() | sel_var(), l | g | sel_var(), any()}.
  27. -type pidpat() :: pid() | sel_var().
  28. -type headpat() :: {keypat(),pidpat(),any()}.
  29. -type key() :: {type(), scope(), any()}.
  30. -type sel_pattern() :: [{headpat(), list(), list()}].
  31. %% update_counter increment
  32. -type ctr_incr() :: integer().
  33. -type ctr_thr() :: integer().
  34. -type ctr_setval() :: integer().
  35. -type ctr_update() :: ctr_incr()
  36. | {ctr_incr(), ctr_thr(), ctr_setval()}.
  37. -type increment() :: ctr_incr() | ctr_update() | [ctr_update()].