void ts_init(void) { /* allocate thread specific storage */ ts_alloc(dirbuf_key, 1, ts_dirbuf_size); ts_alloc(dir_freemap_key, 1, ts_dir_freemap_size); ts_alloc(attr_freemap_key, 1, ts_attr_freemap_size); }
/* Make */ static KThreadEvtNode * KThreadEvtNodeMake ( ctx_t ctx ) { KThreadEvtNode * node = ts_alloc ( sizeof * node, true ); node -> loc = ctx -> loc; node -> zdepth = ctx -> zdepth; return node; }
/* MakeThreadState * creates state for a newly created thread * called from the new thread */ KThreadState * KProcMgrMakeThreadState ( struct KProcMgr const * self ) { if ( self != NULL ) { KThreadState * tstate = ts_alloc ( sizeof * tstate, true ); return tstate; } return NULL; }