shithub: pc

ref: 174b17bb208f2fe4a0973a91f3477d4f1df96c4a
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);
}