µOS++ IIIe Reference 7.0.0
The third edition of µOS++, a POSIX inspired open source framework, written in C++
Loading...
Searching...
No Matches
select.h
Go to the documentation of this file.
1/*
2 * This file is part of the µOS++ distribution.
3 * (https://github.com/micro-os-plus)
4 * Copyright (c) 2015-2023 Liviu Ionescu. All rights reserved.
5 *
6 * Permission to use, copy, modify, and/or distribute this software
7 * for any purpose is hereby granted, under the terms of the MIT license.
8 *
9 * If a copy of the license was not distributed with this file, it can
10 * be obtained from https://opensource.org/licenses/mit/.
11 */
12
13#ifndef POSIX_IO_SYS_SELECT_H_
14#define POSIX_IO_SYS_SELECT_H_
15
16// ----------------------------------------------------------------------------
17
18#include <unistd.h>
19
20#if defined(_POSIX_VERSION)
21#include_next <sys/select.h>
22#else
23
24#include <sys/types.h>
25
26#ifdef __cplusplus
27extern "C"
28{
29#endif
30
31// ----------------------------------------------------------------------------
32
33// typedef struct
34// {
35// }fd_set;
36//
37// struct timeval
38// {
39// time_t tv_sec; // Seconds.
40// suseconds_t tv_usec; // Microseconds.
41// };
42
43 int
44 select (int nfds, fd_set* readfds, fd_set* writefds, fd_set* errorfds,
45 struct timeval* timeout);
46
47// ----------------------------------------------------------------------------
48
49#ifdef __cplusplus
50}
51#endif
52
53#endif /* defined(_POSIX_VERSION) */
54
55#endif /* POSIX_IO_SYS_SELECT_H_ */
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds, struct timeval *timeout)