Changeset a35b458 in mainline for kernel/test/synch/semaphore2.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
  • kernel/test/synch/semaphore2.c

    r3061bc1 ra35b458  
    5050{
    5151        uint32_t rc;
    52        
     52
    5353        spinlock_lock(&sem_lock);
    5454        rc = seed % max;
     
    6262        errno_t rc;
    6363        int to;
    64        
     64
    6565        thread_detach(THREAD);
    66        
     66
    6767        waitq_sleep(&can_start);
    68        
     68
    6969        to = random(20000);
    7070        TPRINTF("cpu%u, tid %" PRIu64 " down+ (%d)\n", CPU->id, THREAD->tid, to);
     
    7474                return;
    7575        }
    76        
     76
    7777        TPRINTF("cpu%u, tid %" PRIu64 " down=\n", CPU->id, THREAD->tid);
    7878        thread_usleep(random(30000));
    79        
     79
    8080        semaphore_up(&sem);
    8181        TPRINTF("cpu%u, tid %" PRIu64 " up\n", CPU->id, THREAD->tid);
     
    8585{
    8686        uint32_t i, k;
    87        
     87
    8888        waitq_initialize(&can_start);
    8989        semaphore_initialize(&sem, 5);
    90        
     90
    9191        thread_t *thrd;
    92        
     92
    9393        k = random(7) + 1;
    9494        TPRINTF("Creating %" PRIu32 " consumers\n", k);
     
    101101                        TPRINTF("Error creating thread\n");
    102102        }
    103        
     103
    104104        thread_usleep(20000);
    105105        waitq_wakeup(&can_start, WAKEUP_ALL);
    106        
     106
    107107        return NULL;
    108108}
Note: See TracChangeset for help on using the changeset viewer.