⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 syscalls_73.html

📁 Linux系统调用
💻 HTML
字号:
<!-- This HTML file has been created by texi2html 1.29
     from syscalls.texi on 4 June 1994 -->

<TITLE>Syscall specifications of Linux - ipc</TITLE>
<P>Go to the <A HREF="syscalls_72.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_72.html">previous</A>, <A HREF="syscalls_74.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_74.html">next</A> section.<P>
<H2><A NAME="SEC73" HREF="syscalls_toc.html#SEC73" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_toc.html#SEC73">ipc</A></H2>
<P>
<H3>SYSNOPSIS</H3>
<P>
<CODE>int sys_ipc (uint <VAR>call</VAR>, int <VAR>first</VAR>, int <VAR>second</VAR>,
int <VAR>third</VAR>, void *<VAR>ptr</VAR>);</CODE>
<P>
<H3>PARAMETERS</H3>
<P>
<VAR>call</VAR>: [in] the ipc call to perform.
<P>
<VAR>first</VAR>, <VAR>second</VAR>, <VAR>third</VAR>: parameters. Depend on
<VAR>call</VAR>.
<P>
<VAR>ptr</VAR>: [in] pointer to a buffer.
<P>
<H3>DESCRIPTION</H3>
<P>
This is an in kernel wrapper for other ipc calls. <VAR>call</VAR> can take
the following values: 
<P>
<DL COMPACT>
<DT><CODE>SEMOP</CODE>
<DD><CODE>sys_semop(first, (struct sembuf *)ptr, second);</CODE>
<P>
<DT><CODE>SEMGET</CODE>
<DD><CODE>sys_semget (first, second, third);</CODE>
<P>
<DT><CODE>SEMCTL</CODE>
<DD><CODE>sys_semctl (first, second, third, ptr);</CODE>
<P>
<DT><CODE>MSGSND</CODE>
<DD><CODE>sys_msgsnd (first, (struct msgbuf *) ptr, second, third);</CODE>
<P>
<DT><CODE>MSGRCV</CODE>
<DD>This one is a little tricky...
<P>
<CODE>struct ipc_kludge tmp;</CODE>
 
<CODE>if (!ptr) return -EINVAL;</CODE>
<P>
<CODE>memcpy_fromfs (&#38;tmp,(struct ipc_kludge *) ptr, sizeof (tmp));</CODE>
<P>
<CODE>return sys_msgrcv (first, tmp.msgp, second, tmp.msgtyp, third);</CODE>
<P>
<DT><CODE>MSGGET</CODE>
<DD><CODE>sys_msgget ((key_t) first, second);</CODE>
<P>
<DT><CODE>MSGCTL</CODE>
<DD><CODE>sys_msgctl (first, second, (struct msqid_ds *) ptr);</CODE>
<P>
<DT><CODE>SHMAT</CODE>
<DD><CODE>sys_shmat (first, (char *) ptr, second, (ulong *) third);</CODE>
<P>
<DT><CODE>SHMDT</CODE>
<DD><CODE>sys_shmdt ((char *)ptr);</CODE>
<P>
<DT><CODE>SHMGET</CODE>
<DD><CODE>sys_shmget (first, second, third);</CODE>
<P>
<DT><CODE>SHMCTL</CODE>
<DD><CODE>sys_shmctl (first, second, (struct shmid_ds *) ptr);</CODE>
</DL>
<P>
<P>Go to the <A HREF="syscalls_72.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_72.html">previous</A>, <A HREF="syscalls_74.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_74.html">next</A> section.<P>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -