Searched refs:nsems (Results 1 – 4 of 4) sorted by relevance
/kernel/linux/linux-5.10/ipc/ |
D | sem.c | 507 static struct sem_array *sem_alloc(size_t nsems) in sem_alloc() argument 511 if (nsems > (INT_MAX - sizeof(*sma)) / sizeof(sma->sems[0])) in sem_alloc() 514 sma = kvzalloc(struct_size(sma, sems, nsems), GFP_KERNEL_ACCOUNT); in sem_alloc() 533 int nsems = params->u.nsems; in newary() local 537 if (!nsems) in newary() 539 if (ns->used_sems + nsems > ns->sc_semmns) in newary() 542 sma = sem_alloc(nsems); in newary() 556 for (i = 0; i < nsems; i++) { in newary() 567 sma->sem_nsems = nsems; in newary() 576 ns->used_sems += nsems; in newary() [all …]
|
D | util.h | 92 int nsems; /* for semaphores */ member
|
/kernel/linux/patches/linux-5.10/yangfan_patch/ |
D | others.patch | 237 @@ -511,7 +511,7 @@ static struct sem_array *sem_alloc(size_t nsems) 238 if (nsems > (INT_MAX - sizeof(*sma)) / sizeof(sma->sems[0])) 241 - sma = kvzalloc(struct_size(sma, sems, nsems), GFP_KERNEL_ACCOUNT); 242 + sma = kvzalloc(struct_size(sma, sems, nsems), GFP_KERNEL); 259 - new = kzalloc(sizeof(struct sem_undo) + sizeof(short)*nsems, GFP_KERNEL_ACCOUNT); 260 + new = kzalloc(sizeof(struct sem_undo) + sizeof(short)*nsems, GFP_KERNEL);
|
/kernel/linux/linux-5.10/include/linux/ |
D | syscalls.h | 807 asmlinkage long sys_semget(key_t key, int nsems, int semflg); 1355 long ksys_semget(key_t key, int nsems, int semflg);
|