initialized m_source - Minix

This is a discussion on initialized m_source - Minix ; Where is m_source of the message structure inisialized (this is not done in syscall)?...

+ Reply to Thread
Results 1 to 2 of 2

Thread: initialized m_source

  1. initialized m_source

    Where is m_source of the message structure inisialized (this is not
    done in syscall)?


  2. Re: initialized m_source

    The message structure is as follows
    typedef struct {
    int m_source; /* who sent the message */
    int m_type; /* what kind of message is it */
    union {
    mess_1 m_m1;
    mess_2 m_m2;
    mess_3 m_m3;
    mess_4 m_m4;
    mess_5 m_m5;
    mess_6 m_m6;
    } m_u;
    } message;

    This is set before calling syscall or taskcall
    example: in _stat.c sets only two values

    PUBLIC int stat(name, buffer)
    _CONST char *name;
    struct stat *buffer;
    {
    message m;

    m.m1_i1 = strlen(name) + 1;
    m.m1_p1 = (char *) name;
    m.m1_p2 = (char *) buffer;
    return(_syscall(FS, STAT, &m));
    }

    the m_type is set in _syscall.c ie in case of stat its set to STAT.

    But m_source is not set here. can any one show the way?


+ Reply to Thread