Changeset a35b458 in mainline for uspace/lib/c/generic/fibril_synch.c


Ignore:
Timestamp:
2018-03-02T20:10:49Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f1380b7
Parents:
3061bc1
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
Message:

style: Remove trailing whitespace on _all_ lines, including empty ones, for particular file types.

Command used: tools/srepl '\s\+$' '' -- *.c *.h *.py *.sh *.s *.S *.ag

Currently, whitespace on empty lines is very inconsistent.
There are two basic choices: Either remove the whitespace, or keep empty lines
indented to the level of surrounding code. The former is AFAICT more common,
and also much easier to do automatically.

Alternatively, we could write script for automatic indentation, and use that
instead. However, if such a script exists, it's possible to use the indented
style locally, by having the editor apply relevant conversions on load/save,
without affecting remote repository. IMO, it makes more sense to adopt
the simpler rule.

File:
1 edited

Legend:

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

    r3061bc1 ra35b458  
    125125{
    126126        bool locked = false;
    127        
     127
    128128        futex_down(&async_futex);
    129129        if (fm->counter > 0) {
     
    133133        }
    134134        futex_up(&async_futex);
    135        
     135
    136136        return locked;
    137137}
     
    143143                awaiter_t *wdp;
    144144                fibril_t *f;
    145        
     145
    146146                tmp = list_first(&fm->waiters);
    147147                assert(tmp != NULL);
     
    173173{
    174174        bool locked = false;
    175        
     175
    176176        futex_down(&async_futex);
    177177        if (fm->counter <= 0)
    178178                locked = true;
    179179        futex_up(&async_futex);
    180        
     180
    181181        return locked;
    182182}
     
    193193{
    194194        fibril_t *f = (fibril_t *) fibril_get_id();
    195        
     195
    196196        futex_down(&async_futex);
    197197        if (frw->writers) {
     
    217217{
    218218        fibril_t *f = (fibril_t *) fibril_get_id();
    219        
     219
    220220        futex_down(&async_futex);
    221221        if (frw->writers || frw->readers) {
     
    261261                frw->writers--;
    262262        }
    263        
     263
    264264        assert(!frw->readers && !frw->writers);
    265        
     265
    266266        frw->oi.owned_by = NULL;
    267        
     267
    268268        while (!list_empty(&frw->waiters)) {
    269269                link_t *tmp = list_first(&frw->waiters);
    270270                awaiter_t *wdp;
    271271                fibril_t *f;
    272                
     272
    273273                wdp = list_get_instance(tmp, awaiter_t, wu_event.link);
    274274                f = (fibril_t *) wdp->fid;
    275                
     275
    276276                f->waits_for = NULL;
    277                
     277
    278278                if (f->flags & FIBRIL_WRITER) {
    279279                        if (frw->readers)
     
    386386                list_remove(&wdata.wu_event.link);
    387387        futex_up(&async_futex);
    388        
     388
    389389        return wdata.to_event.occurred ? ETIMEOUT : EOK;
    390390}
Note: See TracChangeset for help on using the changeset viewer.