�������: ������ (���� | �����������) ��RU opennet.me  
The OpenNET Project / Index page

[ ������� /+++ | ����� | ���� | ]

������� ������������ / ������ "������������ ��� Linux" / ���������� ���������
next up previous contents index
Next: ���������-������ Up: ���������� ������������ ���������� ������ Previous: ���������� ������������ ���������� ������   Contents   Index

������������� shmctl

� ���������� ������ shmctl ��������� ������� ���������� ������ ������ ���:

        #include <sys/types.h>
        #include <sys/ipc.h>
        #include <sys/shm.h>

        int shmctl (shmid, cmd, buf)
        int shmid, cmd;
        struct shmid_ds *buf;
��� �������� ���������� ��������� ����� ����; � ������ ������� ������������ -1.

� �������� ��������� shmid ������ ��������� ������������� ������������ �������� ������, �������������� ���������� ��� ������ ���������� ������ shmget.

����������� �������� ������������ ��������� ��������� cmd. ��������� ��������� ��������:

IPC_STAT

��������� ���������� � ��������� ������������ ��������, ������������ � ��������� ������, ��������������� � ��������������� shmid, � ���������������� ���������, �� ������� ��������� �������� buf.

IPC_SET

� ��������� ������, ��������������� � ��������������� shmid, �������������� �������� ����������� ��������������� ������������ � ������, � ����� ���� �� ��������. ������ �������� ����������� �� ��������� ������, �� ������� ��������� �������� buf.

IPC_RMID

������� �� ������� ������������� shmid, ������������� ����������� ������� ������ � ��������������� � ��� ��������� ������.

SHM_LOCK

���������� � ������ ����������� �������, �������� ��������������� shmid.

SHM_UNLOCK

���������� (��������� ���������� � ������) ����������� �������, �������� ��������������� shmid.

����� ��������� ����������� �������� IPC_SET ��� IPC_RMID, ������� ������ ����� ����������� ������������� ������������, ������ ���� ��������������� ��������� ��� ��������� �������, ���� �������������� �����������������. ����������� �������� SHM_LOCK � SHM_UNLOCK ����� ��������� ������ �����������������. ��� ���������� ������������ �������� IPC_STAT �������� ��������� ����� �� ������.



Alex Otwagin 2002-12-16



������:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
�������:

�������� �� �����
���������� �� ���������
Created 1996-2026 by Maxim Chirkov
��������, ����������, ����������