Changeset 6eef3c4 in mainline for kernel/test/mm


Ignore:
Timestamp:
2012-06-20T16:18:37Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8b36bf2, f22dc820
Parents:
abfc9f3
Message:

cleanup thread_create() and thread_t structure

  • remove 'flag' bitfield from thread_t, use individual boolean flags (can be optimized later on by adding : 1)
  • use an enum for call flags, add THREAD_FLAG_NONE
  • remove the 'uncounted' argument in favour of a call flag
  • introduce thread_wire() to setup wired threads
Location:
kernel/test/mm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/test/mm/falloc2.c

    rabfc9f3 r6eef3c4  
    122122       
    123123        for (unsigned int i = 0; i < THREADS; i++) {
    124                 thread_t *thrd =
    125                     thread_create(falloc, NULL, TASK, 0, "falloc2", false);
     124                thread_t *thrd = thread_create(falloc, NULL, TASK,
     125                    THREAD_FLAG_NONE, "falloc2");
    126126                if (!thrd) {
    127127                        TPRINTF("Could not create thread %u\n", i);
  • kernel/test/mm/slab1.c

    rabfc9f3 r6eef3c4  
    155155       
    156156        semaphore_initialize(&thr_sem, 0);
    157         for (i = 0; i < THREADS; i++) { 
    158                 if (!(t = thread_create(slabtest, (void *) (sysarg_t) i, TASK, 0, "slabtest", false))) {
     157        for (i = 0; i < THREADS; i++) {
     158                if (!(t = thread_create(slabtest, (void *) (sysarg_t) i, TASK, THREAD_FLAG_NONE, "slabtest"))) {
    159159                        TPRINTF("Could not create thread %d\n", i);
    160160                } else
  • kernel/test/mm/slab2.c

    rabfc9f3 r6eef3c4  
    211211        semaphore_initialize(&thr_sem,0);
    212212        for (i = 0; i < THREADS; i++) {
    213                 if (!(t = thread_create(slabtest, NULL, TASK, 0, "slabtest", false))) {
     213                if (!(t = thread_create(slabtest, NULL, TASK, THREAD_FLAG_NONE, "slabtest"))) {
    214214                        TPRINTF("Could not create thread %d\n", i);
    215215                } else
Note: See TracChangeset for help on using the changeset viewer.