shithub: pc

ref: 5ff4a10c5438b8a994dcc79a89b42c765cf4a4b8
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);
}