我正在开发一个基于uCOS
Fusion 标准(而不是 POSIX)的项目,我想将我的套接字设置为非阻塞模式。POSIXioctl
命令会是ioctl(data,FIONBIO, TRUE);
,但我似乎无法在 Fusion 下运行它。在 header 的评论中fclioctl.h
,我看到以下内容:
/*
* The UNIX definition was as follows:
*
* int ioctl( int fd, int cmd, ... )
*
* But since POSIX does not include "ioctl" as part of it's requirements for
* Fusion the format follows more closely to Win32.
*
* TO get information about a device, a handle to the device or a device in
* it's device stack must be obtained.
*/
fclIoResult_t fclIoctl
(
fclHandle_t hDevice, /* Handle to device */
fclIoCode_t nIoControlCode, /* Function to perform */
fclIoBuffer_t pInBuffer, /* Data to the device */
fclIoSize_t nInBufferSize, /* Size of data to the device */
fclIoBuffer_t pOutBuffer, /* Data from the device */
fclIoSize_t nOutBufferSize, /* Size of buffer to receive data */
fclIoSize_t* pnBytesReturned /* Actual number of bytes received */
);
对于 1fclIoCode_t`,我只看到:
/*
* IOCTL Types
*/
typedef unsigned char FIO_BYTE;
typedef unsigned int FIO_WORD;
typedef u32 FIO_DWORD;
#ifndef FCL_IOCODE_T
typedef u32 fclIoCode_t;
#define FCL_IOCODE_T fclIoCode_t
#endif
有没有人有 Fusion 的经验并且可以在这里提供帮助?