misc/lock-monitor/lock-monitor.c
static void add(const void *lock) {
    struct list *l;

    l = (struct list*)malloc(sizeof(struct list));
    l->value = lock;
    l->next = ordering;
    ordering = l;
}
/* Adds an item to the ordering list (the partial ordering). Note that the
 * partial ordering is maintained back-to-front for efficiency (i.e. locks
 * later in the list are actually ones that should be grabbed earlier). With
 * this in mind, it is expected that the lock you are adding is after every
 * currently known lock in the partial ordering. It is assumed that you hold
 * ordering_lock when calling this function.
 */
Adds an item to the ordering list (the partial ordering). Note that the
partial ordering is maintained back-to-front for efficiency . With
this in mind, it is expected that the lock you are adding is after every
currently known lock in the partial ordering. It is assumed that you hold
ordering_lock when calling this function.
Adds an item to the ordering list ( the partial ordering ) . Note that the partial ordering is maintained back - to - front for efficiency . With this in mind it is expected that the lock you are adding is after every currently known lock in the partial ordering . It is assumed that you hold ordering_lock when calling this function .
static void add(const void *lock) {
    struct list *l;
    l = (struct list*)malloc(sizeof(struct list));
    l->value = lock;
    l->next = ordering;
    ordering = l;
}
static void add ( const void * lock ) { struct list * l ; l = ( struct list * ) malloc ( sizeof ( struct list ) ) ; l -> value = lock ; l -> next = ordering ; ordering = l ; }
Adds an item to the ordering list (the partial ordering).
Adds an item to the ordering list ( the partial ordering ) .