Function report |
Source Code:ipc\sem.c |
Create Date:2022-07-28 16:45:21 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:d_alloc_undo - lookup (and if not present create) undo array*@ns: namespace*@semid: semaphore array id* The function looks up (and if not present creates) the undo structure.* The size of the undo structure depends on the size of the semaphore
Proto:static struct sem_undo *find_alloc_undo(struct ipc_namespace *ns, int semid)
Type:struct sem_undo
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct ipc_namespace * | ns | |
| int | semid |
| 1901 | un = lookup_undo(ulp, semid) |
| 1902 | spin_unlock( & lock) |
| 1903 | If Value is more likely to compile time(un != NULL) Then Go to out |
| 1908 | sma = sem_obtain_object_check(ns, semid) |
| 1914 | nsems = . of semaphores in array |
| 1915 | If Not ipc_rcu_getref( & permissions .. see ipc.h ) Then |
| 1918 | Go to out |
| 1923 | new = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). |
| 1924 | If Not new Then |
| 1925 | ipc_rcu_putref( & permissions .. see ipc.h , sem_rcu_free) |
| 1931 | sem_lock_and_putref(sma) |
| 1933 | sem_unlock(sma, - 1) |
| 1937 | Go to out |
| 1944 | un = lookup_undo(ulp, semid) |
| 1945 | If un Then |
| 1950 | array of adjustments = (short * ) & new[1] |
| 1951 | ack ptr to sem_undo_list = ulp |
| 1952 | semaphore set identifier = semid |
| 1953 | assert_spin_locked( & lock) |
| 1959 | success : |
| 1960 | spin_unlock( & lock) |
| 1961 | sem_unlock(sma, - 1) |
| 1962 | out : |
| 1963 | Return un |
| Name | Describe |
|---|---|
| do_semtimedop |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |