Changeset 24345a5 in mainline for kernel/generic/src/proc/thread.c


Ignore:
Timestamp:
2008-11-08T10:01:59Z (16 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
24d6efc
Parents:
7faabb7
Message:

Set meaningful names for loaded programs. Now 'tasks' kconsole command is much less obscure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/proc/thread.c

    r7faabb7 r24345a5  
    280280 *                      call. The task's lock may not be held.
    281281 * @param flags         Thread flags.
    282  * @param name          Symbolic name.
     282 * @param name          Symbolic name (a copy is made).
    283283 * @param uncounted     Thread's accounting doesn't affect accumulated task
    284284 *                      accounting.
     
    317317       
    318318        memcpy(t->name, name, THREAD_NAME_BUFLEN);
     319        t->name[THREAD_NAME_BUFLEN - 1] = '\0';
    319320       
    320321        t->thread_code = func;
     
    716717        int rc;
    717718
    718         if (name_len >= THREAD_NAME_BUFLEN)
     719        if (name_len > THREAD_NAME_BUFLEN - 1)
    719720                name_len = THREAD_NAME_BUFLEN - 1;
    720721
Note: See TracChangeset for help on using the changeset viewer.