mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-27 09:50:03 +00:00
Merge remote-tracking branch 'offical/master'
This commit is contained in:
@@ -2314,7 +2314,7 @@ futex :: proc {
|
||||
*/
|
||||
epoll_create :: proc(size: i32 = 1) -> (Fd, Errno) {
|
||||
when ODIN_ARCH != .arm64 {
|
||||
ret := syscall(SYS_epoll_create)
|
||||
ret := syscall(SYS_epoll_create, i32(1))
|
||||
return errno_unwrap(ret, Fd)
|
||||
} else {
|
||||
ret := syscall(SYS_epoll_create1, i32(0))
|
||||
|
||||
@@ -25,7 +25,7 @@ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority) -> ^Thread {
|
||||
|
||||
when ODIN_OS != .Darwin {
|
||||
// We need to give the thread a moment to start up before we enable cancellation.
|
||||
can_set_thread_cancel_state := unix.pthread_setcancelstate(unix.PTHREAD_CANCEL_DISABLE, nil) == 0
|
||||
can_set_thread_cancel_state := unix.pthread_setcancelstate(unix.PTHREAD_CANCEL_ENABLE, nil) == 0
|
||||
}
|
||||
|
||||
sync.lock(&t.mutex)
|
||||
@@ -40,7 +40,7 @@ _create :: proc(procedure: Thread_Proc, priority: Thread_Priority) -> ^Thread {
|
||||
// Enable thread's cancelability.
|
||||
if can_set_thread_cancel_state {
|
||||
unix.pthread_setcanceltype (unix.PTHREAD_CANCEL_ASYNCHRONOUS, nil)
|
||||
unix.pthread_setcancelstate(unix.PTHREAD_CANCEL_DISABLE, nil)
|
||||
unix.pthread_setcancelstate(unix.PTHREAD_CANCEL_ENABLE, nil)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user