mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 13:52:28 +00:00
Make improvements
- Clean up sigaction() code - Add a port scanner example - Introduce a ParseCidr() API - Clean up our futex abstraction code - Fix a harmless integer overflow in ParseIp() - Use kernel semaphores on NetBSD to make threads much faster
This commit is contained in:
parent
539bddce8c
commit
c995838e5c
107 changed files with 1085 additions and 492 deletions
8
third_party/lua/lunix.c
vendored
8
third_party/lua/lunix.c
vendored
|
@ -2847,14 +2847,6 @@ static int LuaUnixMemoryWait(lua_State *L) {
|
|||
} else {
|
||||
ts.tv_sec = luaL_checkinteger(L, 4);
|
||||
ts.tv_nsec = luaL_optinteger(L, 5, 0);
|
||||
if (!FUTEX_TIMEOUT_IS_ABSOLUTE) {
|
||||
now = timespec_real();
|
||||
if (timespec_cmp(now, ts) > 0) {
|
||||
ts = (struct timespec){0};
|
||||
} else {
|
||||
ts = timespec_sub(ts, now);
|
||||
}
|
||||
}
|
||||
deadline = &ts;
|
||||
}
|
||||
BEGIN_CANCELLATION_POINT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue