MCPcopy Create free account
hub / github.com/F-Stack/f-stack / semu_alloc

Function semu_alloc

freebsd/kern/sysv_sem.c:412–425  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

410 */
411
412static struct sem_undo *
413semu_alloc(struct thread *td)
414{
415 struct sem_undo *suptr;
416
417 SEMUNDO_LOCKASSERT(MA_OWNED);
418 if ((suptr = LIST_FIRST(&semu_free_list)) == NULL)
419 return (NULL);
420 LIST_REMOVE(suptr, un_next);
421 LIST_INSERT_HEAD(&semu_list, suptr, un_next);
422 suptr->un_cnt = 0;
423 suptr->un_proc = td->td_proc;
424 return (suptr);
425}
426
427static int
428semu_try_free(struct sem_undo *suptr)

Callers 1

semundo_adjustFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected