FreeBSD/sys/kern/kern_proc.c
/*
 * Initialize global process hashing structures.
 */
Initialize global process hashing structures.
Initialize global process hashing structures .
void
procinit(void)
{
	sx_init(&allproc_lock, "allproc");
	sx_init(&proctree_lock, "proctree");
	mtx_init(&ppeers_lock, "p_peers", NULL, MTX_DEF);
	LIST_INIT(&allproc);
	LIST_INIT(&zombproc);
	pidhashtbl = hashinit(maxproc / 4, M_PROC, &pidhash);
	pgrphashtbl = hashinit(maxproc / 4, M_PROC, &pgrphash);
	proc_zone = uma_zcreate("PROC", sched_sizeof_proc(),
	    proc_ctor, proc_dtor, proc_init, proc_fini,
	    UMA_ALIGN_PTR, UMA_ZONE_NOFREE);
	uihashinit();
}
void procinit ( void ) { sx_init ( & allproc_lock , " " ) ; sx_init ( & proctree_lock , " " ) ; mtx_init ( & ppeers_lock , " " , NULL , MTX_DEF ) ; LIST_INIT ( & allproc ) ; LIST_INIT ( & zombproc ) ; pidhashtbl = hashinit ( maxproc / 4 , M_PROC , & pidhash ) ; pgrphashtbl = hashinit ( maxproc / 4 , M_PROC , & pgrphash ) ; proc_zone = uma_zcreate ( " " , sched_sizeof_proc ( ) , proc_ctor , proc_dtor , proc_init , proc_fini , UMA_ALIGN_PTR , UMA_ZONE_NOFREE ) ; uihashinit ( ) ; }
Initialize global process hashing structures.
Initialize global process hashing structures .