Processes

In the Phoenix-RTOS 3 each process is described using process_t structure.

typedef struct _process_t {
    struct _process_t *next;
    struct _process_t *prev;

    lock_t lock;

    struct _process_t *parent;
    struct _process_t *childs;

    const char *path;
    unsigned int id;

    enum { NORMAL = 0, ZOMBIE } state;

#ifndef NOMMU
    vm_map_t map;
#endif
    vm_map_t *mapp;
    amap_t *amap;
    int exit;
    char lazy;

    rbtree_t resources;
    void *got;
} process_t;