Introduce pthread_cancel() for terminating threads
pthread_cancel() is safer way to terminate thread than pthread_kill(). This function can be found from ISO/IEC 9945-1:1996 (“POSIX.1”) and first introduced into Single Unix Specification version 2 on 1997.
This commit is contained in:
parent
84da91cebe
commit
fcc8237add
@ -491,6 +491,7 @@ extern {
|
||||
oldset: *mut sigset_t) -> ::c_int;
|
||||
pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
|
||||
pub fn getgrnam(name: *const ::c_char) -> *mut ::group;
|
||||
pub fn pthread_cancel(thread: ::pthread_t) -> ::c_int;
|
||||
pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
|
||||
pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
|
||||
pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
|
||||
|
@ -1411,6 +1411,7 @@ extern {
|
||||
oldset: *mut sigset_t) -> ::c_int;
|
||||
pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t;
|
||||
pub fn getgrnam(name: *const ::c_char) -> *mut ::group;
|
||||
pub fn pthread_cancel(thread: ::pthread_t) -> ::c_int;
|
||||
pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int;
|
||||
pub fn sem_unlink(name: *const ::c_char) -> ::c_int;
|
||||
pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int;
|
||||
|
Loading…
Reference in New Issue
Block a user