Skip to content

Commit 435f7c3

Browse files
committed
Add some extensions to pthread for armv6k-nintendo-3ds
The pthread_attr_t type can have priority and affinity values set. pthread_getpriority returns the priority of the current thread. These are needed to enable std thread support. std can't link directly with libctru so we go through pthread as an intermediate interface.
1 parent ac40e64 commit 435f7c3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/unix/newlib/horizon/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,5 +190,11 @@ extern "C" {
190190
value: *mut ::c_void,
191191
) -> ::c_int;
192192

193+
pub fn pthread_attr_setpriority(attr: *mut ::pthread_attr_t, priority: ::c_int) -> ::c_int;
194+
195+
pub fn pthread_attr_setaffinity(attr: *mut ::pthread_attr_t, affinity: ::c_int) -> ::c_int;
196+
197+
pub fn pthread_getpriority() -> ::c_int;
198+
193199
pub fn gethostid() -> ::c_long;
194200
}

0 commit comments

Comments
 (0)