ref.c 168 B

12345678910111213141516
  1. #include <u.h>
  2. #include <libc.h>
  3. #include <thread.h>
  4. #include "threadimpl.h"
  5. void
  6. incref(Ref *r)
  7. {
  8. _xinc(&r->ref);
  9. }
  10. long
  11. decref(Ref *r)
  12. {
  13. return _xdec(&r->ref);
  14. }