Changeset 8565a42 in mainline for uspace/lib/c/generic/thread.c


Ignore:
Timestamp:
2018-03-02T20:34:50Z (7 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1a81f69, d5e5fd1
Parents:
3061bc1 (diff), 34e1206 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
git-committer:
GitHub <noreply@…> (2018-03-02 20:34:50)
Message:

Remove all trailing whitespace, everywhere.

See individual commit messages for details.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/thread.c

    r3061bc1 r8565a42  
    6565        if (fibril == NULL)
    6666                thread_exit(0);
    67        
     67
    6868        __tcb_set(fibril->tcb);
    69        
     69
    7070#ifdef FUTEX_UPGRADABLE
    7171        rcu_register_fibril();
    7272        futex_upgrade_all_and_wait();
    7373#endif
    74        
     74
    7575        uarg->uspace_thread_function(uarg->uspace_thread_arg);
    7676        /*
     
    8080         * free(uarg);
    8181         */
    82        
     82
    8383        /* If there is a manager, destroy it */
    8484        async_destroy_manager();
     
    8787        rcu_deregister_fibril();
    8888#endif
    89        
     89
    9090        fibril_teardown(fibril, false);
    91        
     91
    9292        thread_exit(0);
    9393}
     
    112112        if (!uarg)
    113113                return ENOMEM;
    114        
     114
    115115        size_t stack_size = stack_size_get();
    116116        void *stack = as_area_create(AS_AREA_ANY, stack_size,
     
    121121                return ENOMEM;
    122122        }
    123        
     123
    124124        /* Make heap thread safe. */
    125125        malloc_enable_multithreaded();
    126        
     126
    127127        uarg->uspace_entry = (void *) FADDR(__thread_entry);
    128128        uarg->uspace_stack = stack;
     
    131131        uarg->uspace_thread_arg = arg;
    132132        uarg->uspace_uarg = uarg;
    133        
     133
    134134        errno_t rc = (errno_t) __SYSCALL4(SYS_THREAD_CREATE, (sysarg_t) uarg,
    135135            (sysarg_t) name, (sysarg_t) str_size(name), (sysarg_t) tid);
    136        
     136
    137137        if (rc != EOK) {
    138138                /*
     
    143143                free(uarg);
    144144        }
    145        
     145
    146146        return rc;
    147147}
     
    155155{
    156156        __SYSCALL1(SYS_THREAD_EXIT, (sysarg_t) status);
    157        
     157
    158158        /* Unreachable */
    159159        while (1);
     
    214214         * full argument range
    215215         */
    216        
     216
    217217        while (sec > 0) {
    218218                unsigned int period = (sec > 1000) ? 1000 : sec;
    219                
     219
    220220                thread_usleep(period * 1000000);
    221221                sec -= period;
    222222        }
    223        
     223
    224224        return 0;
    225225}
Note: See TracChangeset for help on using the changeset viewer.