Changeset 407 for trunk/kernel/mm/vseg.h


Ignore:
Timestamp:
Nov 7, 2017, 3:08:12 PM (7 years ago)
Author:
alain
Message:

First implementation of fork/exec.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/mm/vseg.h

    r406 r407  
    3636
    3737/**********************************************************************************************
    38  * This enum defines the vseg types
     38 * This enum defines the vseg types for an user process.
    3939 *********************************************************************************************/
    4040
    41 enum
     41typedef enum
    4242{
    43     VSEG_TYPE_CODE   = 0,          /*! executable code        / private / localized          */
    44     VSEG_TYPE_DATA   = 1,          /*! initialized data       / public  / distributed        */
    45     VSEG_TYPE_HEAP   = 2,          /*! standard malloc        / public  / distributed        */
    46     VSEG_TYPE_STACK  = 3,          /*! execution stack        / private / localized          */
    47     VSEG_TYPE_ANON   = 4,          /*! anonymous mmap         / public  / localized          */
    48     VSEG_TYPE_FILE   = 5,          /*! file mmap              / public  / localized          */
    49     VSEG_TYPE_REMOTE = 6,          /*! remote mmap            / public  / localized          */
    50     VSEG_TYPE_KCODE  = 7,          /*! kernel code            / private / localized          */
    51     VSEG_TYPE_KDATA  = 8,          /*! kernel data            / private / localized          */
    52     VSEG_TYPE_KDEV   = 9,          /*! device segment         / public  / localized          */
     43    VSEG_TYPE_CODE   = 0,          /*! executable user code   / private / localized          */
     44    VSEG_TYPE_DATA   = 1,          /*! initialized user data  / public  / distributed        */
     45    VSEG_TYPE_STACK  = 2,          /*! execution user stack   / private / localized          */
     46    VSEG_TYPE_ANON   = 3,          /*! anonymous mmap         / public  / localized          */
     47    VSEG_TYPE_FILE   = 4,          /*! file mmap              / public  / localized          */
     48    VSEG_TYPE_REMOTE = 5,          /*! remote mmap            / public  / localized          */
    5349
    54     VSEG_TYPES_NR    = 10,
    55 };
     50    VSEG_TYPE_KDATA  = 10,
     51    VSEG_TYPE_KCODE  = 11,
     52    VSEG_TYPE_KDEV   = 12,
     53}
     54vseg_type_t;
    5655
    5756
     
    8180        vpn_t             vpn_size;     /*! number of pages occupied                             */
    8281        uint32_t          flags;        /*! vseg attributes                                      */
    83         xptr_t            mapper_xp;    /*! xptr on remote mapper (for types CODE / DATA / FILE) */
    84         intptr_t          file_offset;  /*! vseg offset in file (for types CODE/DATA)            */
     82        xptr_t            mapper_xp;    /*! xptr on remote mapper (for types CODE/DATA/FILE)    */
     83        intptr_t          file_offset;  /*! vseg offset in file (for types CODE/DATA/FILE        */
    8584    intptr_t          file_size;    /*! max segment size in mapper (for type CODE/DATA)      */
    8685    cxy_t             cxy;          /*! physical mapping (for non distributed vseg)          */
     
    125124 *********************************************************************************************/
    126125void vseg_init( vseg_t      * vseg,
     126                    vseg_type_t   type,
    127127                intptr_t      base,
    128                     intptr_t      size,
     128                    uint32_t      size,
    129129                vpn_t         vpn_base,
    130130                vpn_t         vpn_size,
    131                     uint32_t      type,
     131                uint32_t      file_offset,
     132                uint32_t      file_size,
     133                xptr_t        mapper_xp,
    132134                cxy_t         cxy );
    133135
Note: See TracChangeset for help on using the changeset viewer.