semctl()함수

803 단어 linuxunixcmd
semctl()  함 수 는 신 호 량(집합)을 제어 할 때 사용 되 지만 가장 많이 사용 되 는 것 은 삭제 입 니 다.
Linux 의 원형 은:
int semctl(int semid, int semnum, int cmd, ...);

그러나 다른 시스템 에 서 는 원형 이 달라 질 수 있다.
SUSv2 and SUSv3 specify that the final argument to semctl() is optional. However, a few (mainly older) UNIX implementations (and older versions of glibc) prototyped semctl() as follows:
int semctl(int semid, int semnum, int cmd, union semun arg);
This meant that the fourth argument was required even in the cases where it is not actually used (e.g., the IPC_RMID and GETVAL operations described below). For full portability, we specify a dummy final argument to semctl() in those calls where it is not required.
그래서 우 리 는 흔히'Dummy 변 수 는 마지막 위치 에 놓 여 있다'고 정의 합 니 다.

좋은 웹페이지 즐겨찾기