Changeset 8565a42 in mainline for uspace/lib/c/generic/fibril.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/fibril.c

    r3061bc1 r8565a42  
    7777        rcu_register_fibril();
    7878#endif
    79        
     79
    8080        /* Call the implementing function. */
    8181        fibril->retval = fibril->func(fibril->arg);
    82        
     82
    8383        futex_down(&async_futex);
    8484        fibril_switch(FIBRIL_FROM_DEAD);
     
    9494        if (!tcb)
    9595                return NULL;
    96        
     96
    9797        fibril_t *fibril = malloc(sizeof(fibril_t));
    9898        if (!fibril) {
     
    100100                return NULL;
    101101        }
    102        
     102
    103103        tcb->fibril_data = fibril;
    104104        fibril->tcb = tcb;
    105        
     105
    106106        fibril->func = NULL;
    107107        fibril->arg = NULL;
     
    110110        fibril->retval = 0;
    111111        fibril->flags = 0;
    112        
     112
    113113        fibril->waits_for = NULL;
    114114
     
    123123        list_append(&fibril->all_link, &fibril_list);
    124124        futex_up(&fibril_futex);
    125        
     125
    126126        return fibril;
    127127}
     
    176176                break;
    177177        }
    178        
     178
    179179        fibril_t *srcf = __tcb_get()->fibril_data;
    180180        if (stype != FIBRIL_FROM_DEAD) {
    181                
     181
    182182                /* Save current state */
    183183                if (!context_save(&srcf->ctx)) {
     
    202202                                srcf->clean_after_me = NULL;
    203203                        }
    204                        
     204
    205205                        return 1;       /* futex_unlock already done here */
    206206                }
    207                
     207
    208208                /* Put the current fibril into the correct run list */
    209209                switch (stype) {
     
    226226                }
    227227        }
    228        
     228
    229229        fibril_t *dstf;
    230230
     
    235235                dstf = list_get_instance(list_first(&manager_list), fibril_t,
    236236                    link);
    237                
     237
    238238                if (stype == FIBRIL_FROM_DEAD)
    239239                        dstf->clean_after_me = srcf;
     
    246246
    247247        list_remove(&dstf->link);
    248        
     248
    249249        futex_unlock(&fibril_futex);
    250        
     250
    251251#ifdef FUTEX_UPGRADABLE
    252252        if (stype == FIBRIL_FROM_DEAD) {
     
    254254        }
    255255#endif
    256        
     256
    257257        context_restore(&dstf->ctx);
    258258        /* not reached */
     
    271271{
    272272        fibril_t *fibril;
    273        
     273
    274274        fibril = fibril_setup();
    275275        if (fibril == NULL)
    276276                return 0;
    277        
     277
    278278        size_t stack_size = (stksz == FIBRIL_DFLT_STK_SIZE) ?
    279279            stack_size_get() : stksz;
     
    285285                return 0;
    286286        }
    287        
     287
    288288        fibril->func = func;
    289289        fibril->arg = arg;
     
    307307{
    308308        fibril_t *fibril = (fibril_t *) fid;
    309        
     309
    310310        as_area_destroy(fibril->stack);
    311311        fibril_teardown(fibril, false);
     
    321321{
    322322        fibril_t *fibril = (fibril_t *) fid;
    323        
     323
    324324        futex_lock(&fibril_futex);
    325325        list_append(&fibril->link, &ready_list);
     
    336336{
    337337        fibril_t *fibril = (fibril_t *) fid;
    338        
     338
    339339        futex_lock(&fibril_futex);
    340340        list_append(&fibril->link, &manager_list);
Note: See TracChangeset for help on using the changeset viewer.