Skip to content

Commit ab7925f

Browse files
committed
haiku: add missing pthread_create.
1 parent dc2e747 commit ab7925f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/unix/haiku/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t {
636636
};
637637
pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t {
638638
flags: 0,
639-
owner: 0,
639+
owner: -1,
640640
lock_sem: 0,
641641
lock_count: 0,
642642
reader_count: 0,
@@ -794,6 +794,10 @@ f! {
794794
extern {
795795
pub fn clock_gettime(clk_id: ::c_int, tp: *mut ::timespec) -> ::c_int;
796796
pub fn clock_settime(clk_id: ::c_int, tp: *const ::timespec) -> ::c_int;
797+
pub fn pthread_create(thread: *mut ::pthread_t,
798+
attr: *const ::pthread_attr_t,
799+
f: extern fn(*mut ::c_void) -> *mut ::c_void,
800+
value: *mut ::c_void) -> ::c_int;
797801
pub fn pthread_attr_getguardsize(attr: *const ::pthread_attr_t,
798802
guardsize: *mut ::size_t) -> ::c_int;
799803
pub fn pthread_attr_getstack(attr: *const ::pthread_attr_t,

0 commit comments

Comments
 (0)