summaryrefslogtreecommitdiffstats
path: root/ipc/sem.c
diff options
context:
space:
mode:
authorDavidlohr Bueso <davidlohr@hp.com>2014-01-27 20:07:05 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-28 00:02:39 -0500
commit8001c85810dd2277d75ae60376e840456afa9b7e (patch)
tree60a03cdecbbbb6e2bdca6b132b4b332f90a728ad /ipc/sem.c
parent239521f31d7496a5322ee664ed8bbd1027b98c4b (diff)
ipc: standardize code comments
IPC commenting style is all over the place, *specially* in util.c. This patch orders things a bit. Signed-off-by: Davidlohr Bueso <davidlohr@hp.com> Cc: Aswin Chandramouleeswaran <aswin@hp.com> Cc: Rik van Riel <riel@redhat.com> Acked-by: Manfred Spraul <manfred@colorfullife.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc/sem.c')
-rw-r--r--ipc/sem.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/ipc/sem.c b/ipc/sem.c
index c40876b5b002..1b1acdb0aee8 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -225,7 +225,7 @@ static void unmerge_queues(struct sem_array *sma)
225} 225}
226 226
227/** 227/**
228 * merge_queues - Merge single semop queues into global queue 228 * merge_queues - merge single semop queues into global queue
229 * @sma: semaphore array 229 * @sma: semaphore array
230 * 230 *
231 * This function merges all per-semaphore queues into the global queue. 231 * This function merges all per-semaphore queues into the global queue.
@@ -474,7 +474,6 @@ static inline void sem_rmid(struct ipc_namespace *ns, struct sem_array *s)
474 * 474 *
475 * Called with sem_ids.rwsem held (as a writer) 475 * Called with sem_ids.rwsem held (as a writer)
476 */ 476 */
477
478static int newary(struct ipc_namespace *ns, struct ipc_params *params) 477static int newary(struct ipc_namespace *ns, struct ipc_params *params)
479{ 478{
480 int id; 479 int id;
@@ -682,7 +681,7 @@ static void wake_up_sem_queue_prepare(struct list_head *pt,
682} 681}
683 682
684/** 683/**
685 * wake_up_sem_queue_do(pt) - do the actual wake-up 684 * wake_up_sem_queue_do - do the actual wake-up
686 * @pt: list of tasks to be woken up 685 * @pt: list of tasks to be woken up
687 * 686 *
688 * Do the actual wake-up. 687 * Do the actual wake-up.
@@ -748,7 +747,7 @@ static int check_restart(struct sem_array *sma, struct sem_queue *q)
748} 747}
749 748
750/** 749/**
751 * wake_const_ops(sma, semnum, pt) - Wake up non-alter tasks 750 * wake_const_ops - wake up non-alter tasks
752 * @sma: semaphore array. 751 * @sma: semaphore array.
753 * @semnum: semaphore that was modified. 752 * @semnum: semaphore that was modified.
754 * @pt: list head for the tasks that must be woken up. 753 * @pt: list head for the tasks that must be woken up.
@@ -798,15 +797,14 @@ static int wake_const_ops(struct sem_array *sma, int semnum,
798} 797}
799 798
800/** 799/**
801 * do_smart_wakeup_zero(sma, sops, nsops, pt) - wakeup all wait for zero tasks 800 * do_smart_wakeup_zero - wakeup all wait for zero tasks
802 * @sma: semaphore array 801 * @sma: semaphore array
803 * @sops: operations that were performed 802 * @sops: operations that were performed
804 * @nsops: number of operations 803 * @nsops: number of operations
805 * @pt: list head of the tasks that must be woken up. 804 * @pt: list head of the tasks that must be woken up.
806 * 805 *
807 * do_smart_wakeup_zero() checks all required queue for wait-for-zero 806 * Checks all required queue for wait-for-zero operations, based
808 * operations, based on the actual changes that were performed on the 807 * on the actual changes that were performed on the semaphore array.
809 * semaphore array.
810 * The function returns 1 if at least one operation was completed successfully. 808 * The function returns 1 if at least one operation was completed successfully.
811 */ 809 */
812static int do_smart_wakeup_zero(struct sem_array *sma, struct sembuf *sops, 810static int do_smart_wakeup_zero(struct sem_array *sma, struct sembuf *sops,
@@ -850,7 +848,7 @@ static int do_smart_wakeup_zero(struct sem_array *sma, struct sembuf *sops,
850 848
851 849
852/** 850/**
853 * update_queue(sma, semnum): Look for tasks that can be completed. 851 * update_queue - look for tasks that can be completed.
854 * @sma: semaphore array. 852 * @sma: semaphore array.
855 * @semnum: semaphore that was modified. 853 * @semnum: semaphore that was modified.
856 * @pt: list head for the tasks that must be woken up. 854 * @pt: list head for the tasks that must be woken up.
@@ -920,7 +918,7 @@ again:
920} 918}
921 919
922/** 920/**
923 * set_semotime(sma, sops) - set sem_otime 921 * set_semotime - set sem_otime
924 * @sma: semaphore array 922 * @sma: semaphore array
925 * @sops: operations that modified the array, may be NULL 923 * @sops: operations that modified the array, may be NULL
926 * 924 *
@@ -938,7 +936,7 @@ static void set_semotime(struct sem_array *sma, struct sembuf *sops)
938} 936}
939 937
940/** 938/**
941 * do_smart_update(sma, sops, nsops, otime, pt) - optimized update_queue 939 * do_smart_update - optimized update_queue
942 * @sma: semaphore array 940 * @sma: semaphore array
943 * @sops: operations that were performed 941 * @sops: operations that were performed
944 * @nsops: number of operations 942 * @nsops: number of operations
@@ -1647,7 +1645,7 @@ static struct sem_undo *lookup_undo(struct sem_undo_list *ulp, int semid)
1647} 1645}
1648 1646
1649/** 1647/**
1650 * find_alloc_undo - Lookup (and if not present create) undo array 1648 * find_alloc_undo - lookup (and if not present create) undo array
1651 * @ns: namespace 1649 * @ns: namespace
1652 * @semid: semaphore array id 1650 * @semid: semaphore array id
1653 * 1651 *
@@ -1737,7 +1735,7 @@ out:
1737 1735
1738 1736
1739/** 1737/**
1740 * get_queue_result - Retrieve the result code from sem_queue 1738 * get_queue_result - retrieve the result code from sem_queue
1741 * @q: Pointer to queue structure 1739 * @q: Pointer to queue structure
1742 * 1740 *
1743 * Retrieve the return code from the pending queue. If IN_WAKEUP is found in 1741 * Retrieve the return code from the pending queue. If IN_WAKEUP is found in