Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/linux
File: sem.h
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
[0] Fix | Delete
#ifndef _LINUX_SEM_H
[1] Fix | Delete
#define _LINUX_SEM_H
[2] Fix | Delete
[3] Fix | Delete
#include <linux/ipc.h>
[4] Fix | Delete
[5] Fix | Delete
/* semop flags */
[6] Fix | Delete
#define SEM_UNDO 0x1000 /* undo the operation on exit */
[7] Fix | Delete
[8] Fix | Delete
/* semctl Command Definitions. */
[9] Fix | Delete
#define GETPID 11 /* get sempid */
[10] Fix | Delete
#define GETVAL 12 /* get semval */
[11] Fix | Delete
#define GETALL 13 /* get all semval's */
[12] Fix | Delete
#define GETNCNT 14 /* get semncnt */
[13] Fix | Delete
#define GETZCNT 15 /* get semzcnt */
[14] Fix | Delete
#define SETVAL 16 /* set semval */
[15] Fix | Delete
#define SETALL 17 /* set all semval's */
[16] Fix | Delete
[17] Fix | Delete
/* ipcs ctl cmds */
[18] Fix | Delete
#define SEM_STAT 18
[19] Fix | Delete
#define SEM_INFO 19
[20] Fix | Delete
#define SEM_STAT_ANY 20
[21] Fix | Delete
[22] Fix | Delete
/* Obsolete, used only for backwards compatibility and libc5 compiles */
[23] Fix | Delete
struct semid_ds {
[24] Fix | Delete
struct ipc_perm sem_perm; /* permissions .. see ipc.h */
[25] Fix | Delete
__kernel_time_t sem_otime; /* last semop time */
[26] Fix | Delete
__kernel_time_t sem_ctime; /* create/last semctl() time */
[27] Fix | Delete
struct sem *sem_base; /* ptr to first semaphore in array */
[28] Fix | Delete
struct sem_queue *sem_pending; /* pending operations to be processed */
[29] Fix | Delete
struct sem_queue **sem_pending_last; /* last pending operation */
[30] Fix | Delete
struct sem_undo *undo; /* undo requests on this array */
[31] Fix | Delete
unsigned short sem_nsems; /* no. of semaphores in array */
[32] Fix | Delete
};
[33] Fix | Delete
[34] Fix | Delete
/* Include the definition of semid64_ds */
[35] Fix | Delete
#include <asm/sembuf.h>
[36] Fix | Delete
[37] Fix | Delete
/* semop system calls takes an array of these. */
[38] Fix | Delete
struct sembuf {
[39] Fix | Delete
unsigned short sem_num; /* semaphore index in array */
[40] Fix | Delete
short sem_op; /* semaphore operation */
[41] Fix | Delete
short sem_flg; /* operation flags */
[42] Fix | Delete
};
[43] Fix | Delete
[44] Fix | Delete
/* arg for semctl system calls. */
[45] Fix | Delete
union semun {
[46] Fix | Delete
int val; /* value for SETVAL */
[47] Fix | Delete
struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */
[48] Fix | Delete
unsigned short *array; /* array for GETALL & SETALL */
[49] Fix | Delete
struct seminfo *__buf; /* buffer for IPC_INFO */
[50] Fix | Delete
void *__pad;
[51] Fix | Delete
};
[52] Fix | Delete
[53] Fix | Delete
struct seminfo {
[54] Fix | Delete
int semmap;
[55] Fix | Delete
int semmni;
[56] Fix | Delete
int semmns;
[57] Fix | Delete
int semmnu;
[58] Fix | Delete
int semmsl;
[59] Fix | Delete
int semopm;
[60] Fix | Delete
int semume;
[61] Fix | Delete
int semusz;
[62] Fix | Delete
int semvmx;
[63] Fix | Delete
int semaem;
[64] Fix | Delete
};
[65] Fix | Delete
[66] Fix | Delete
/*
[67] Fix | Delete
* SEMMNI, SEMMSL and SEMMNS are default values which can be
[68] Fix | Delete
* modified by sysctl.
[69] Fix | Delete
* The values has been chosen to be larger than necessary for any
[70] Fix | Delete
* known configuration.
[71] Fix | Delete
*
[72] Fix | Delete
* SEMOPM should not be increased beyond 1000, otherwise there is the
[73] Fix | Delete
* risk that semop()/semtimedop() fails due to kernel memory fragmentation when
[74] Fix | Delete
* allocating the sop array.
[75] Fix | Delete
*/
[76] Fix | Delete
[77] Fix | Delete
[78] Fix | Delete
#define SEMMNI 32000 /* <= IPCMNI max # of semaphore identifiers */
[79] Fix | Delete
#define SEMMSL 32000 /* <= INT_MAX max num of semaphores per id */
[80] Fix | Delete
#define SEMMNS (SEMMNI*SEMMSL) /* <= INT_MAX max # of semaphores in system */
[81] Fix | Delete
#define SEMOPM 500 /* <= 1 000 max num of ops per semop call */
[82] Fix | Delete
#define SEMVMX 32767 /* <= 32767 semaphore maximum value */
[83] Fix | Delete
#define SEMAEM SEMVMX /* adjust on exit max value */
[84] Fix | Delete
[85] Fix | Delete
/* unused */
[86] Fix | Delete
#define SEMUME SEMOPM /* max num of undo entries per process */
[87] Fix | Delete
#define SEMMNU SEMMNS /* num of undo structures system wide */
[88] Fix | Delete
#define SEMMAP SEMMNS /* # of entries in semaphore map */
[89] Fix | Delete
#define SEMUSZ 20 /* sizeof struct sem_undo */
[90] Fix | Delete
[91] Fix | Delete
[92] Fix | Delete
#endif /* _LINUX_SEM_H */
[93] Fix | Delete
[94] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function