Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/proc/thread.c

    r897fd8f1 ra53ed3a  
    153153 *
    154154 */
    155 static int thr_constructor(void *obj, unsigned int kmflags)
     155static errno_t thr_constructor(void *obj, unsigned int kmflags)
    156156{
    157157        thread_t *thread = (thread_t *) obj;
     
    639639 *
    640640 */
    641 int thread_join_timeout(thread_t *thread, uint32_t usec, unsigned int flags)
     641errno_t thread_join_timeout(thread_t *thread, uint32_t usec, unsigned int flags)
    642642{
    643643        if (thread == THREAD)
     
    930930 *
    931931 */
    932 sysarg_t sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name,
     932sys_errno_t sys_thread_create(uspace_arg_t *uspace_uarg, char *uspace_name,
    933933    size_t name_len, thread_id_t *uspace_thread_id)
    934934{
     
    937937       
    938938        char namebuf[THREAD_NAME_BUFLEN];
    939         int rc = copy_from_uspace(namebuf, uspace_name, name_len);
    940         if (rc != 0)
    941                 return (sysarg_t) rc;
     939        errno_t rc = copy_from_uspace(namebuf, uspace_name, name_len);
     940        if (rc != EOK)
     941                return (sys_errno_t) rc;
    942942       
    943943        namebuf[name_len] = 0;
     
    951951       
    952952        rc = copy_from_uspace(kernel_uarg, uspace_uarg, sizeof(uspace_arg_t));
    953         if (rc != 0) {
     953        if (rc != EOK) {
    954954                free(kernel_uarg);
    955                 return (sysarg_t) rc;
     955                return (sys_errno_t) rc;
    956956        }
    957957       
     
    962962                        rc = copy_to_uspace(uspace_thread_id, &thread->tid,
    963963                            sizeof(thread->tid));
    964                         if (rc != 0) {
     964                        if (rc != EOK) {
    965965                                /*
    966966                                 * We have encountered a failure, but the thread
     
    977977                                free(kernel_uarg);
    978978                               
    979                                 return (sysarg_t) rc;
     979                                return (sys_errno_t) rc;
    980980                         }
    981981                }
     
    999999                free(kernel_uarg);
    10001000       
    1001         return (sysarg_t) ENOMEM;
     1001        return (sys_errno_t) ENOMEM;
    10021002}
    10031003
     
    10051005 *
    10061006 */
    1007 sysarg_t sys_thread_exit(int uspace_status)
     1007sys_errno_t sys_thread_exit(int uspace_status)
    10081008{
    10091009        thread_exit();
     
    10181018 *
    10191019 */
    1020 sysarg_t sys_thread_get_id(thread_id_t *uspace_thread_id)
     1020sys_errno_t sys_thread_get_id(thread_id_t *uspace_thread_id)
    10211021{
    10221022        /*
     
    10251025         *
    10261026         */
    1027         return (sysarg_t) copy_to_uspace(uspace_thread_id, &THREAD->tid,
     1027        return (sys_errno_t) copy_to_uspace(uspace_thread_id, &THREAD->tid,
    10281028            sizeof(THREAD->tid));
    10291029}
    10301030
    10311031/** Syscall wrapper for sleeping. */
    1032 sysarg_t sys_thread_usleep(uint32_t usec)
     1032sys_errno_t sys_thread_usleep(uint32_t usec)
    10331033{
    10341034        thread_usleep(usec);
     
    10361036}
    10371037
    1038 sysarg_t sys_thread_udelay(uint32_t usec)
     1038sys_errno_t sys_thread_udelay(uint32_t usec)
    10391039{
    10401040        delay(usec);
Note: See TracChangeset for help on using the changeset viewer.