Rev | Line | |
---|
[9] | 1 | #include <lib.h>
|
---|
| 2 |
|
---|
| 3 | PUBLIC int _syscall(who, syscallnr, msgptr)
|
---|
| 4 | int who;
|
---|
| 5 | int syscallnr;
|
---|
| 6 | register message *msgptr;
|
---|
| 7 | {
|
---|
| 8 | int status;
|
---|
| 9 |
|
---|
| 10 | msgptr->m_type = syscallnr;
|
---|
| 11 | status = _sendrec(who, msgptr);
|
---|
| 12 | if (status != 0) {
|
---|
| 13 | /* 'sendrec' itself failed. */
|
---|
| 14 | /* XXX - strerror doesn't know all the codes */
|
---|
| 15 | msgptr->m_type = status;
|
---|
| 16 | }
|
---|
| 17 | if (msgptr->m_type < 0) {
|
---|
| 18 | errno = -msgptr->m_type;
|
---|
| 19 | return(-1);
|
---|
| 20 | }
|
---|
| 21 | return(msgptr->m_type);
|
---|
| 22 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.