Skip to Content
Mastering Linux Kernel Development
book

Mastering Linux Kernel Development

by CH Raghav Maruthi
October 2017
Intermediate to advanced
354 pages
9h 28m
English
Packt Publishing
Content preview from Mastering Linux Kernel Development

Data structures

Each SysV semaphore set is represented in the kernel by a descriptor of type struct sem_array:

/* One sem_array data structure for each set of semaphores in the system. */struct sem_array {        struct kern_ipc_perm ____cacheline_aligned_in_smp sem_perm;                                                                                   time_t sem_ctime;               /* last change time */        struct sem *sem_base;           /*ptr to first semaphore in array */        struct list_head pending_alter; /* pending operations */                                        /* that alter the array */        struct list_head pending_const; /* pending complex operations */                                        /* that do not alter semvals */        struct list_head list_id;       /* undo requests on this array */        int sem_nsems;                  /* no. of semaphores in array */        int complex_count;              /* pending complex operations */ bool complex_mode; /* no parallel simple ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Kernel Development, Third Edition

Linux Kernel Development, Third Edition

Robert Love
Understanding the Linux Kernel

Understanding the Linux Kernel

Daniel P. Bovet, Marco Cesati
Linux Kernel Debugging

Linux Kernel Debugging

Kaiwan N. Billimoria

Publisher Resources

ISBN: 9781785883057Other