跪求AIX下毫秒级的延迟C语言函数
(2011-12-21 07:55:01)
标签:
c语言
杂谈
跪求AIX下毫秒级的延迟C语言函数各位大GG, 大JJ,
在下跪求AIX下毫秒级的延迟C语言函数, 谢谢了!跪求AIX下毫秒级的延迟C语言函数[ Bottom of Page |
Previous Page | Next Page | Contents | Index | Library Home | Legal
| Search ]
Technical Reference: Communications, Volume 1
select Subroutine Interface for Data Link Control (DLC)
Devices
Purpose
Allows data to be sent using a file descriptor.
Syntax
#include ;
int select (nfdsmsgs, readlist, writelist, exceptlist,
timeout)
Description
The select subroutine checks the specified file descriptor and
message queues to see if they are ready for reading (receiving) or
writing (sending), or if they have an exception condition
pending.
Note
Generic data link control (GDLC) does not support transmit for
nonblocked notification in the full sense. If the writelist
parameter is specified in the select call, GDLC always returns as
if transmit is available. There is no checking to see if internal
buffering is available or if internal control-block locks are free.
These resources are much too dynamic, and tests for their
availability can be done reasonably only at the time of use.
The readlist and exceptlist parameters are fully supported.
Whenever the selection criteria specified by the SelType parameter
is true, the file system returns a value that indicates the total
number of file descriptors and message queues that satisfy the
selection criteria. The fdsmask bit masks are modified so that bits
set to a value of 1 indicate file descriptors that meet the
criteria. The msgids arrays are altered so that message queue
identifiers that do not meet the criteria are replaced with a value
of -1. If the selection is not satisfied, the calling process is
put to sleep waiting on a selwakeup subroutine at a later
time.
Each GDLC supports the select subroutine interface via its
dlcselect entry point. This subroutine can be called from the
process environment only.
Para
劲霸 writelist, and exceptlist
parameters specify what to check for during reading, writing, and
exceptions, respectively. Each sellist is a structure that contains
a file descriptor bit mask (fdsmask) and message queue identifiers
(msgids).
The writelist criterion is always set to True by GDLC.
timeout Points to a structure that specifies the maximum length of
time to wait for at least one of the selection criteria to be met
(if the timeout parameter is not a null pointer).
Return Values
Upon successful completion, the select subroutine returns a value
that indicates the total number of file descriptors and message
queues that satisfy the selection criteria. The return value is
similar to the nfdsmsgs parameter in that the low-order 16 bits
give the number of file descriptors. Also, the high-order 16 bits
give the number of message queue identifiers. These values indicate
the sum total that meet each of the read and exception
criteria.
If the time limit specified by the timeout parameter expires, then
the select subroutine returns a value of 0 (zero).
If an error occurs, a value of -1 is returned with one of the
following error values available using the errno global variable,
as defined in the /usr/include/sys/errno.h file:
EBADF Indicates a bad file number.
EINTR Indicates that a signal interrupted the subroutine before it
found any of the selected events.
EINVAL Indicates that one of the parameters contained an invalid
value.
Related Information
The select subroutine.
Select/Poll Logic for ddwrite and ddread Routines in AIX 5L Version
5.2 Technical Reference: Kernel and Subsystems Volume 1.
Generic Data Link Control (GDLC) Environment Overview in AIX 5L
Version 5.2 Communications Programming Concepts.
[ Top of Page | Previous Page | Next Page | Contents | Index |
Library Home | Legal | Search ]napms:
用法http://www.yuqingzhai.com:
napms(500);
分享:
喜欢
0
赠金笔
加载中,请稍候......
评论加载中,请稍候...
发评论
登录名: 密码: 找回密码 注册记住登录状态
昵 称:
评论并转载此博文
发评论
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。