ref: 4f5465e4779e30fa99e1e4856f9d81524e02a8df
dir: /sys/src/libc/9sys/privalloc.c/
#include <u.h>
#include <libc.h>
static Lock privlock;
extern void **_privates;
extern int _nprivates;
void **
privalloc(void)
{
void **p;
lock(&privlock);
if(_nprivates > 0)
p = &_privates[--_nprivates];
else
p = nil;
unlock(&privlock);
return p;
}