| ... | @@ -1430,3 +1430,29 @@ pub const LOCK_SH = 1; | ... | @@ -1430,3 +1430,29 @@ pub const LOCK_SH = 1; |
| 1430 | pub const LOCK_EX = 2; | 1430 | pub const LOCK_EX = 2; |
| 1431 | pub const LOCK_UN = 8; | 1431 | pub const LOCK_UN = 8; |
| 1432 | pub const LOCK_NB = 4; | 1432 | pub const LOCK_NB = 4; |
| | 1433 | |
| | 1434 | pub const nfds_t = usize; |
| | 1435 | pub const pollfd = extern struct { |
| | 1436 | fd: fd_t, |
| | 1437 | events: i16, |
| | 1438 | revents: i16, |
| | 1439 | }; |
| | 1440 | |
| | 1441 | pub const POLLIN = 0x001; |
| | 1442 | pub const POLLPRI = 0x002; |
| | 1443 | pub const POLLOUT = 0x004; |
| | 1444 | pub const POLLRDNORM = 0x040; |
| | 1445 | pub const POLLWRNORM = POLLOUT; |
| | 1446 | pub const POLLRDBAND = 0x080; |
| | 1447 | pub const POLLWRBAND = 0x100; |
| | 1448 | |
| | 1449 | pub const POLLEXTEND = 0x0200; |
| | 1450 | pub const POLLATTRIB = 0x0400; |
| | 1451 | pub const POLLNLINK = 0x0800; |
| | 1452 | pub const POLLWRITE = 0x1000; |
| | 1453 | |
| | 1454 | pub const POLLERR = 0x008; |
| | 1455 | pub const POLLHUP = 0x010; |
| | 1456 | pub const POLLNVAL = 0x020; |
| | 1457 | |
| | 1458 | pub const POLLSTANDARD = POLLIN | POLLPRI | POLLOUT | POLLRDNORM | POLLRDBAND | POLLWRBAND | POLLERR | POLLHUP | POLLNVAL; |