2 copies of taskcall.c removed

- taskcall.c is 3x in the trunk as part of libc, libsysutil and
  libsys.  It should be only part of libsys.

- only system process should be linked with libsys, therefore using
  raw _taskcall() in service.c is replaced by _syscall()

- the same for minix_rs.c

- lib/other/sys_eniop.c can go without replacement as it is part of
  syslib
This commit is contained in:
Tomas Hruby
2010-01-25 14:22:09 +00:00
parent 769e5f373a
commit ee4cff8d66
7 changed files with 17 additions and 74 deletions

View File

@@ -88,11 +88,9 @@ libc_FILES=" \
strtok_r.c \
strtoll.c \
swab.c \
sys_eniop.c \
syscall.c \
sysconf.c \
syslog.c \
taskcall.c \
telldir.c \
termcap.c \
ttyname.c \

View File

@@ -16,10 +16,10 @@
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <lib.h>
int minix_rs_lookup(const char *name, endpoint_t *value)
{
int r;
message m;
size_t len_key;
@@ -28,12 +28,11 @@ int minix_rs_lookup(const char *name, endpoint_t *value)
m.RS_NAME = (char *) name;
m.RS_NAME_LEN = len_key;
r = _taskcall(RS_PROC_NR, RS_LOOKUP, &m);
if(r == OK) {
if (_syscall(RS_PROC_NR, RS_LOOKUP, &m) != -1) {
*value = m.RS_ENDPOINT;
return OK;
}
return r;
return -1;
}

View File

@@ -1,14 +0,0 @@
#include "../syslib/syslib.h"
/*===========================================================================*
* sys_enable_iop *
*===========================================================================*/
PUBLIC int sys_enable_iop(proc_nr_e)
endpoint_t proc_nr_e; /* number of process to allow I/O */
{
message m_iop;
m_iop.IO_ENDPT = proc_nr_e;
return _taskcall(SYSTASK, SYS_IOPENABLE, &m_iop);
}

View File

@@ -1,20 +0,0 @@
/* _taskcall() is the same as _syscall() except it returns negative error
* codes directly and not in errno. This is a better interface for MM and
* FS.
*/
#include <lib.h>
#include <minix/syslib.h>
PUBLIC int _taskcall(who, syscallnr, msgptr)
endpoint_t who;
int syscallnr;
register message *msgptr;
{
int status;
msgptr->m_type = syscallnr;
status = _sendrec(who, msgptr);
if (status != 0) return(status);
return(msgptr->m_type);
}

View File

@@ -20,7 +20,6 @@ libsys_FILES=" \
fkey_ctl.c \
tsc_util.c \
report.c \
taskcall.c \
read_tsc.s \
read_tsc_64.c \
ser_putc.c \

View File

@@ -1,20 +0,0 @@
/* _taskcall() is the same as _syscall() except it returns negative error
* codes directly and not in errno. This is a better interface for MM and
* FS.
*/
#include <lib.h>
#include <minix/syslib.h>
PUBLIC int _taskcall(who, syscallnr, msgptr)
endpoint_t who;
int syscallnr;
register message *msgptr;
{
int status;
msgptr->m_type = syscallnr;
status = _sendrec(who, msgptr);
if (status != 0) return(status);
return(msgptr->m_type);
}