git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Kernel/PTYs - Finishing touches on implimentation
[tpg/acess2.git]
/
Usermode
/
Libraries
/
ld-acess.so_src
/
include_exp
/
acess
/
fd_set.h
diff --git
a/Usermode/Libraries/ld-acess.so_src/include_exp/acess/fd_set.h
b/Usermode/Libraries/ld-acess.so_src/include_exp/acess/fd_set.h
index
8972cbe
..
b2367d1
100644
(file)
--- a/
Usermode/Libraries/ld-acess.so_src/include_exp/acess/fd_set.h
+++ b/
Usermode/Libraries/ld-acess.so_src/include_exp/acess/fd_set.h
@@
-30,17
+30,20
@@
static inline void FD_ZERO(fd_set *fdsetp)
static inline void FD_CLR(int fd, fd_set *fdsetp)
{
if(fd < 0 || fd > FD_SETSIZE) return;
static inline void FD_CLR(int fd, fd_set *fdsetp)
{
if(fd < 0 || fd > FD_SETSIZE) return;
- fdsetp->flags[fd/16] &= (fd_set_ent_t) ((~1 << (fd%16))) & 0xFFFF;
+ fd_set_ent_t mask = 1 << (fd % 16);
+ fdsetp->flags[fd/16] &= ~mask;
}
static inline void FD_SET(int fd, fd_set *fdsetp)
{
if(fd < 0 || fd > FD_SETSIZE) return;
}
static inline void FD_SET(int fd, fd_set *fdsetp)
{
if(fd < 0 || fd > FD_SETSIZE) return;
- fdsetp->flags[fd/16] |= (fd_set_ent_t) (1 << (fd%16));
+ fd_set_ent_t mask = 1 << (fd % 16);
+ fdsetp->flags[fd/16] |= mask;
}
static inline int FD_ISSET(int fd, fd_set *fdsetp)
{
if(fd < 0 || fd > FD_SETSIZE) return 0;
}
static inline int FD_ISSET(int fd, fd_set *fdsetp)
{
if(fd < 0 || fd > FD_SETSIZE) return 0;
- return !!( fdsetp->flags[fd/16] & (1<<(fd%16)) );
+ fd_set_ent_t mask = 1 << (fd % 16);
+ return !!( fdsetp->flags[fd/16] & mask );
}
#endif
}
#endif
UCC
git Repository :: git.ucc.asn.au