Changes in kernel/generic/src/proc/thread.c [a53ed3a:897fd8f1] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/proc/thread.c
ra53ed3a r897fd8f1 153 153 * 154 154 */ 155 static errno_t thr_constructor(void *obj, unsigned int kmflags)155 static int thr_constructor(void *obj, unsigned int kmflags) 156 156 { 157 157 thread_t *thread = (thread_t *) obj; … … 639 639 * 640 640 */ 641 errno_t thread_join_timeout(thread_t *thread, uint32_t usec, unsigned int flags)641 int 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 _errno_t sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name,932 sysarg_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 errno_t rc = copy_from_uspace(namebuf, uspace_name, name_len);940 if (rc != EOK)941 return (sys _errno_t) rc;939 int rc = copy_from_uspace(namebuf, uspace_name, name_len); 940 if (rc != 0) 941 return (sysarg_t) rc; 942 942 943 943 namebuf[name_len] = 0; … … 951 951 952 952 rc = copy_from_uspace(kernel_uarg, uspace_uarg, sizeof(uspace_arg_t)); 953 if (rc != EOK) {953 if (rc != 0) { 954 954 free(kernel_uarg); 955 return (sys _errno_t) rc;955 return (sysarg_t) rc; 956 956 } 957 957 … … 962 962 rc = copy_to_uspace(uspace_thread_id, &thread->tid, 963 963 sizeof(thread->tid)); 964 if (rc != EOK) {964 if (rc != 0) { 965 965 /* 966 966 * We have encountered a failure, but the thread … … 977 977 free(kernel_uarg); 978 978 979 return (sys _errno_t) rc;979 return (sysarg_t) rc; 980 980 } 981 981 } … … 999 999 free(kernel_uarg); 1000 1000 1001 return (sys _errno_t) ENOMEM;1001 return (sysarg_t) ENOMEM; 1002 1002 } 1003 1003 … … 1005 1005 * 1006 1006 */ 1007 sys _errno_t sys_thread_exit(int uspace_status)1007 sysarg_t sys_thread_exit(int uspace_status) 1008 1008 { 1009 1009 thread_exit(); … … 1018 1018 * 1019 1019 */ 1020 sys _errno_t sys_thread_get_id(thread_id_t *uspace_thread_id)1020 sysarg_t sys_thread_get_id(thread_id_t *uspace_thread_id) 1021 1021 { 1022 1022 /* … … 1025 1025 * 1026 1026 */ 1027 return (sys _errno_t) copy_to_uspace(uspace_thread_id, &THREAD->tid,1027 return (sysarg_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 _errno_t sys_thread_usleep(uint32_t usec)1032 sysarg_t sys_thread_usleep(uint32_t usec) 1033 1033 { 1034 1034 thread_usleep(usec); … … 1036 1036 } 1037 1037 1038 sys _errno_t sys_thread_udelay(uint32_t usec)1038 sysarg_t sys_thread_udelay(uint32_t usec) 1039 1039 { 1040 1040 delay(usec);
Note:
See TracChangeset
for help on using the changeset viewer.