* Initialize type-stable parts of a proc (when newly created). */
| 260 | * Initialize type-stable parts of a proc (when newly created). |
| 261 | */ |
| 262 | static int |
| 263 | proc_init(void *mem, int size, int flags) |
| 264 | { |
| 265 | struct proc *p; |
| 266 | |
| 267 | p = (struct proc *)mem; |
| 268 | mtx_init(&p->p_mtx, "process lock", NULL, MTX_DEF | MTX_DUPOK | MTX_NEW); |
| 269 | mtx_init(&p->p_slock, "process slock", NULL, MTX_SPIN | MTX_NEW); |
| 270 | mtx_init(&p->p_statmtx, "pstatl", NULL, MTX_SPIN | MTX_NEW); |
| 271 | mtx_init(&p->p_itimmtx, "pitiml", NULL, MTX_SPIN | MTX_NEW); |
| 272 | mtx_init(&p->p_profmtx, "pprofl", NULL, MTX_SPIN | MTX_NEW); |
| 273 | cv_init(&p->p_pwait, "ppwait"); |
| 274 | TAILQ_INIT(&p->p_threads); /* all threads in proc */ |
| 275 | EVENTHANDLER_DIRECT_INVOKE(process_init, p); |
| 276 | p->p_stats = pstats_alloc(); |
| 277 | p->p_pgrp = NULL; |
| 278 | return (0); |
| 279 | } |
| 280 | |
| 281 | /* |
| 282 | * UMA should ensure that this function is never called. |
nothing calls this directly
no test coverage detected