Changeset b7fd2a0 in mainline for kernel/generic/src/proc/thread.c
- Timestamp:
- 2018-01-13T03:10:29Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/thread.c
r36f0738 rb7fd2a0 153 153 * 154 154 */ 155 static int thr_constructor(void *obj, unsigned int kmflags)155 static errno_t thr_constructor(void *obj, unsigned int kmflags) 156 156 { 157 157 thread_t *thread = (thread_t *) obj; … … 639 639 * 640 640 */ 641 int thread_join_timeout(thread_t *thread, uint32_t usec, unsigned int flags)641 errno_t thread_join_timeout(thread_t *thread, uint32_t usec, unsigned int flags) 642 642 { 643 643 if (thread == THREAD) … … 930 930 * 931 931 */ 932 sys arg_t sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name,932 sys_errno_t sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name, 933 933 size_t name_len, thread_id_t *uspace_thread_id) 934 934 { … … 937 937 938 938 char namebuf[THREAD_NAME_BUFLEN]; 939 int rc = copy_from_uspace(namebuf, uspace_name, name_len);939 errno_t rc = copy_from_uspace(namebuf, uspace_name, name_len); 940 940 if (rc != 0) 941 return (sys arg_t) rc;941 return (sys_errno_t) rc; 942 942 943 943 namebuf[name_len] = 0; … … 953 953 if (rc != 0) { 954 954 free(kernel_uarg); 955 return (sys arg_t) rc;955 return (sys_errno_t) rc; 956 956 } 957 957 … … 977 977 free(kernel_uarg); 978 978 979 return (sys arg_t) rc;979 return (sys_errno_t) rc; 980 980 } 981 981 } … … 999 999 free(kernel_uarg); 1000 1000 1001 return (sys arg_t) ENOMEM;1001 return (sys_errno_t) ENOMEM; 1002 1002 } 1003 1003 … … 1005 1005 * 1006 1006 */ 1007 sys arg_t sys_thread_exit(int uspace_status)1007 sys_errno_t sys_thread_exit(int uspace_status) 1008 1008 { 1009 1009 thread_exit(); … … 1018 1018 * 1019 1019 */ 1020 sys arg_t sys_thread_get_id(thread_id_t *uspace_thread_id)1020 sys_errno_t sys_thread_get_id(thread_id_t *uspace_thread_id) 1021 1021 { 1022 1022 /* … … 1025 1025 * 1026 1026 */ 1027 return (sys arg_t) copy_to_uspace(uspace_thread_id, &THREAD->tid,1027 return (sys_errno_t) copy_to_uspace(uspace_thread_id, &THREAD->tid, 1028 1028 sizeof(THREAD->tid)); 1029 1029 } 1030 1030 1031 1031 /** Syscall wrapper for sleeping. */ 1032 sys arg_t sys_thread_usleep(uint32_t usec)1032 sys_errno_t sys_thread_usleep(uint32_t usec) 1033 1033 { 1034 1034 thread_usleep(usec); … … 1036 1036 } 1037 1037 1038 sys arg_t sys_thread_udelay(uint32_t usec)1038 sys_errno_t sys_thread_udelay(uint32_t usec) 1039 1039 { 1040 1040 delay(usec);
Note:
See TracChangeset
for help on using the changeset viewer.