Changeset 150385b9 in mainline


Ignore:
Timestamp:
2009-03-03T23:00:58Z (15 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
63d1ebd
Parents:
ff685c9
Message:

Init task names for arm32.

Files:
5 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/arm32/loader/Makefile

    rff685c9 r150385b9  
    6868        _components.c \
    6969        ../../../generic/printf.c \
     70        ../../../generic/string.c \
    7071        ../../../genarch/division.c
    7172
  • boot/arch/arm32/loader/main.c

    rff685c9 r150385b9  
    4242#include <align.h>
    4343#include <macros.h>
     44#include <string.h>
    4445
    4546#include "mm.h"
     
    104105                        bootinfo.tasks[bootinfo.cnt].addr = ((void *) KERNEL_VIRTUAL_ADDRESS) + top;
    105106                        bootinfo.tasks[bootinfo.cnt].size = components[i].size;
     107                        strncpy(bootinfo.tasks[bootinfo.cnt].name,
     108                            components[i].name, BOOTINFO_TASK_NAME_BUFLEN);
    106109                        bootinfo.cnt++;
    107110                }
  • boot/arch/arm32/loader/main.h

    rff685c9 r150385b9  
    4343#define TASKMAP_MAX_RECORDS 32
    4444
     45/** Size of buffer for storing task name in task_t. */
     46#define BOOTINFO_TASK_NAME_BUFLEN 32
     47
    4548
    4649/** Struct holding information about single loaded task. */
     
    5053        /** Size of the task's binary. */
    5154        unsigned int size;
     55        /** Task name. */
     56        char name[BOOTINFO_TASK_NAME_BUFLEN];
    5257} task_t;
    5358
  • kernel/arch/arm32/include/arch.h

    rff685c9 r150385b9  
    4040#define CPUMAP_MAX_RECORDS   32
    4141
     42#define BOOTINFO_TASK_NAME_BUFLEN 32
     43
    4244#include <typedefs.h>
    4345
     
    4547        uintptr_t addr;
    4648        uint32_t size;
     49        char name[BOOTINFO_TASK_NAME_BUFLEN];
    4750} utask_t;
    4851
  • kernel/arch/arm32/src/arm32.c

    rff685c9 r150385b9  
    4949#include <userspace.h>
    5050#include <macros.h>
     51#include <string.h>
    5152
    5253/** Performs arm32-specific initialization before main_bsp() is called. */
     
    6061                init.tasks[i].addr = bootinfo->tasks[i].addr;
    6162                init.tasks[i].size = bootinfo->tasks[i].size;
     63                strncpy(init.tasks[i].name, bootinfo->tasks[i].name,
     64                        CONFIG_TASK_NAME_BUFLEN);
    6265        }
    6366}
Note: See TracChangeset for help on using the changeset viewer.