···241241 </para>242242 <para>243243 The third type is a semaphore244244- (<filename class="headerfile">include/asm/semaphore.h</filename>): it244244+ (<filename class="headerfile">include/linux/semaphore.h</filename>): it245245 can have more than one holder at any time (the number decided at246246 initialization time), although it is most commonly used as a247247 single-holder lock (a mutex). If you can't get a semaphore, your···290290 <para>291291 If you have a data structure which is only ever accessed from292292 user context, then you can use a simple semaphore293293- (<filename>linux/asm/semaphore.h</filename>) to protect it. This 293293+ (<filename>linux/linux/semaphore.h</filename>) to protect it. This294294 is the most trivial case: you initialize the semaphore to the number 295295 of resources available (usually 1), and call296296 <function>down_interruptible()</function> to grab the semaphore, and ···16561656 #include <linux/slab.h>16571657 #include <linux/string.h>16581658+#include <linux/rcupdate.h>16591659- #include <asm/semaphore.h>16591659+ #include <linux/semaphore.h>16601660 #include <asm/errno.h>1661166116621662 struct object
···1515#include <linux/version.h>1616#include <linux/rbtree.h>1717#include <linux/posix_acl.h>1818-#include <asm/semaphore.h>1818+#include <linux/semaphore.h>19192020struct jffs2_inode_info {2121 /* We need an internal mutex similar to inode->i_mutex.
···20202121#include <linux/time.h>2222#include <linux/wait.h>2323+#include <linux/semaphore.h>2324#include <asm/atomic.h>2424-#include <asm/semaphore.h>25252626/*2727 * sema_t structure just maps to struct semaphore in Linux kernel.