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

📄 rt_sem_wait.2

📁 rtlinux(realtime linix)3.0,在kernel2.2.18上编译运行
💻 2
字号:
.\".\" Copyright (C) 1997 Jerry Epplin.  All rights reserved..\".\" Permission is granted to make and distribute verbatim copies of this.\" manual provided the copyright notice and this permission notice are.\" preserved on all copies..\".\" Permission is granted to copy and distribute modified versions of this.\" manual under the conditions for verbatim copying, provided that the.\" entire resulting derived work is distributed under the terms of a.\" permission notice identical to this one.\" .\" The author assumes no responsibility for errors or omissions, or for.\" damages resulting from the use of the information contained herein..\" .\" Formatted or processed versions of this manual, if unaccompanied by.\" the source, must acknowledge the copyright and authors of this work..\".TH RT_SEM_WAIT 2 "26 July 1997" "rt_ipc" "rt_ipc".SH NAMErt_sem_wait \- semaphore 'wait' operation (with blocking).SH SYNOPSIS.nf.B #define MODULE.B #include <linux/module.h> .B #include <linux/kernel.h> .B #include <linux/version.h> .B #include <linux/errno.h> .B #include "rt_ipc.h".fi.sp.BI "int rt_sem_wait(rt_sem_t *" sem ", RTIME " timeout ");.SH DESCRIPTION.B rt_sem_waitis the semaphore wait (sometimes known as 'take' or 'P') operation.Unlike with.BR rt_sem_trywait ,if the semaphore is not available, the calling task blocks untilit is..I sempoints to the structure used in the call to.BR rt_sem_create .An optional.I timeoutcan be specified.  If .I timeoutis RT_WAIT_FOREVER, the function does not time out.  If.I timeoutis RT_NO_WAIT and the semaphore is not available,.B rt_sem_waitreturns immediately.  If.I timeoutis any other value, it represent a time at which the call to.B rt_sem_waitshould time out.  If that time is reached,.B rt_sem_waitreturns with -ETIME..SH "RETURN VALUE"On success, 0 is returned.  On failure, a negative value is returnedas described below..SH ERRORS.IP \fB-ETIME\fPThe timeout period expired..IP \fB-EINVAL\fP.I semdoes not point to a valid rt_sem_t..SH "AUTHOR"Jerry Epplin <JerryEpplin@worldnet.att.net>.SH "SEE ALSO".BR rt_task_ipc_delete (2), .BR rt_task_ipc_init (2), .BR rt_sem_destroy (2), .BR rt_sem_init (2), .BR rt_sem_post (2),.BR rt_sem_trywait (2)

⌨️ 快捷键说明

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