message is a struct.
There are 7 different message formats numbered 1 - 8, but number 6 is obsolete.
All share the following fields:
int m_source; /* sender */ int m_type; /* what kind of message; e.g., the system call number */
The other fields depend on which of the 7 message formats is to be used.
The function
_syscall(who, syscallnr, &m)
puts the syscallnr into m.m_type for you.
So in general a user level function will not have to fill in the message type or source.
Instead the system call gets the address of the user's message and may fill in various fields as a result of executing whatever the system call implementation function does.
For functions like mygetpid() that don't have parameters, no message fields need to be filled in.
The user level function WILL need to then extract the information from the message.
At that point it is necessary to know which of the 7 message formats is being used for this system call.