shithub: pc

ref: 33ccdc7f42803457a2bbb11eeb633f9dbafd6e9f
dir: /include/thread.h/

View raw version
typedef struct Ref Ref;

struct Ref {
	long ref;
};

static void
incref(Ref *r)
{
	r->ref++;
}

static long
decref(Ref *r)
{
	return --(r->ref);
}