?? rt_sem_init.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_INIT 2 "21 July 1997" "rt_ipc" "rt_ipc".SH NAMErt_sem_init \- create a semaphore.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_init(rt_sem_t *" sem ", RT_SEMTYPE " type ", int " init_val ");.SH DESCRIPTION.B rt_sem_initis called to initialize a real-time semaphore. A semaphore can be used forcommunication and synchronization among real-time tasks. Communicationbetween Linux processes and real-time tasks is done using the standardReal-Time Linux RT-FIFO facilities..PP.I semmust point to a statically allocated structure..I typeis RT_SEM_BINARY or RT_SEM_COUNTING..I init_valis the initial value of the semaphore (usually 0)..SH "RETURN VALUE"On success, 0 is returned. On failure, a negative value is returnedas described below..SH ERRORS.IP \fB-EINVAL\fP.I init_valis negative (or .I typeis RT_SEM_BINARY, and .I init_valis greater than one..SH "BUGS"Priority inheritance is not currently supported..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_post (2), .BR rt_sem_trywait (2), .BR rt_sem_wait (2)
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -