FIONBIO 用于 Fusion 下的 ioctl

问题描述

我正在开发一个基于 uCOS 和 Fusion 标准(而不是 POSIX)的项目,我想将我的套接字设置为非阻塞模式。 POSIX ioctl 命令将是 ioctl(data,FIONBIO,TRUE); 但我似乎无法让它在 Fusion 下运行。 在标题 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 的经验并且可以在这里提供帮助?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)