| 76 | } // anonymous namespace |
| 77 | |
| 78 | ThreadHandle CreateThread( const char * name, DaedThread function, void * argument ) |
| 79 | { |
| 80 | pthread_t thread; |
| 81 | pthread_attr_t thread_attr; |
| 82 | |
| 83 | pthread_attr_init( &thread_attr ); |
| 84 | |
| 85 | SDaedThreadDetails * thread_details = new SDaedThreadDetails( function, argument ); |
| 86 | |
| 87 | s32 result = ::pthread_create( &thread, &thread_attr, &StartThreadFunc, thread_details ); |
| 88 | if(result == 0) |
| 89 | { |
| 90 | return PthreadToHandle( thread ); |
| 91 | } |
| 92 | |
| 93 | pthread_attr_destroy( &thread_attr ); |
| 94 | return kInvalidThreadHandle; |
| 95 | } |
| 96 | |
| 97 | void SetThreadPriority( ThreadHandle handle, EThreadPriority pri ) |
| 98 | { |
nothing calls this directly
no test coverage detected