Renamed findproc() to _pm_findproc() to reduce polluting of application
namespace.
This commit is contained in:
parent
d9544b38d3
commit
7b58dd7f9b
13 changed files with 20 additions and 21 deletions
|
@ -195,7 +195,7 @@ int main(int argc, char *argv[])
|
||||||
eth_ign_proto= htons((u16_t) v);
|
eth_ign_proto= htons((u16_t) v);
|
||||||
|
|
||||||
/* Try to notify inet that we are present (again) */
|
/* Try to notify inet that we are present (again) */
|
||||||
r = findproc("inet", &tasknr);
|
r = _pm_findproc("inet", &tasknr);
|
||||||
if (r == OK)
|
if (r == OK)
|
||||||
notify(tasknr);
|
notify(tasknr);
|
||||||
|
|
||||||
|
|
|
@ -579,7 +579,7 @@ PUBLIC int main(int argc, char **argv)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Try to notify inet that we are present (again) */
|
/* Try to notify inet that we are present (again) */
|
||||||
rc = findproc("inet", &tasknr);
|
rc = _pm_findproc("inet", &tasknr);
|
||||||
if (rc == OK)
|
if (rc == OK)
|
||||||
notify(tasknr);
|
notify(tasknr);
|
||||||
|
|
||||||
|
|
|
@ -284,7 +284,7 @@ int main(int argc, char *argv[])
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Try to notify inet that we are present (again) */
|
/* Try to notify inet that we are present (again) */
|
||||||
r = findproc("inet", &tasknr);
|
r = _pm_findproc("inet", &tasknr);
|
||||||
if (r == OK)
|
if (r == OK)
|
||||||
notify(tasknr);
|
notify(tasknr);
|
||||||
|
|
||||||
|
|
|
@ -327,7 +327,7 @@ void main( int argc, char **argv )
|
||||||
eth_ign_proto= htons((u16_t) v);
|
eth_ign_proto= htons((u16_t) v);
|
||||||
|
|
||||||
/* Try to notify inet that we are present (again) */
|
/* Try to notify inet that we are present (again) */
|
||||||
r = findproc("inet", &tasknr);
|
r = _pm_findproc("inet", &tasknr);
|
||||||
if (r == OK)
|
if (r == OK)
|
||||||
notify(tasknr);
|
notify(tasknr);
|
||||||
|
|
||||||
|
|
|
@ -303,7 +303,7 @@ int main(int argc, char *argv[])
|
||||||
* not yet alive.
|
* not yet alive.
|
||||||
*/
|
*/
|
||||||
(progname=strrchr(argv[0],'/')) ? progname++ : (progname=argv[0]);
|
(progname=strrchr(argv[0],'/')) ? progname++ : (progname=argv[0]);
|
||||||
r = findproc("inet", &inet_proc_nr);
|
r = _pm_findproc("inet", &inet_proc_nr);
|
||||||
if (r == OK) notify(inet_proc_nr);
|
if (r == OK) notify(inet_proc_nr);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -180,7 +180,7 @@ _PROTOTYPE( int getsigset, (sigset_t *sigset) );
|
||||||
_PROTOTYPE( int getprocnr, (void) );
|
_PROTOTYPE( int getprocnr, (void) );
|
||||||
_PROTOTYPE( int getnprocnr, (pid_t pid) );
|
_PROTOTYPE( int getnprocnr, (pid_t pid) );
|
||||||
_PROTOTYPE( int getpprocnr, (void) );
|
_PROTOTYPE( int getpprocnr, (void) );
|
||||||
_PROTOTYPE( int findproc, (char *proc_name, int *proc_nr) );
|
_PROTOTYPE( int _pm_findproc, (char *proc_name, int *proc_nr) );
|
||||||
_PROTOTYPE( int allocmem, (phys_bytes size, phys_bytes *base) );
|
_PROTOTYPE( int allocmem, (phys_bytes size, phys_bytes *base) );
|
||||||
_PROTOTYPE( int freemem, (phys_bytes size, phys_bytes base) );
|
_PROTOTYPE( int freemem, (phys_bytes size, phys_bytes base) );
|
||||||
#define DEV_MAP 1
|
#define DEV_MAP 1
|
||||||
|
|
|
@ -8,7 +8,7 @@ libc_FILES=" \
|
||||||
_allocmem.c \
|
_allocmem.c \
|
||||||
_brk.c \
|
_brk.c \
|
||||||
_devctl.c \
|
_devctl.c \
|
||||||
_findproc.c \
|
__pm_findproc.c \
|
||||||
_freemem.c \
|
_freemem.c \
|
||||||
_getnpid.c \
|
_getnpid.c \
|
||||||
_getsigset.c \
|
_getsigset.c \
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
#include <lib.h>
|
#include <lib.h>
|
||||||
#define findproc _findproc
|
#define _pm_findproc __pm_findproc
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
PUBLIC int _pm_findproc(proc_name, proc_nr)
|
||||||
PUBLIC int findproc(proc_name, proc_nr)
|
|
||||||
char *proc_name; /* name of process to search for */
|
char *proc_name; /* name of process to search for */
|
||||||
int *proc_nr; /* return process number here */
|
int *proc_nr; /* return process number here */
|
||||||
{
|
{
|
|
@ -4,6 +4,7 @@ LIBRARIES=libc
|
||||||
|
|
||||||
libc_FILES=" \
|
libc_FILES=" \
|
||||||
_exit.s \
|
_exit.s \
|
||||||
|
_pm_findproc.s \
|
||||||
access.s \
|
access.s \
|
||||||
alarm.s \
|
alarm.s \
|
||||||
allocmem.s \
|
allocmem.s \
|
||||||
|
@ -29,7 +30,6 @@ libc_FILES=" \
|
||||||
execve.s \
|
execve.s \
|
||||||
execvp.s \
|
execvp.s \
|
||||||
fcntl.s \
|
fcntl.s \
|
||||||
findproc.s \
|
|
||||||
fork.s \
|
fork.s \
|
||||||
fpathconf.s \
|
fpathconf.s \
|
||||||
freemem.s \
|
freemem.s \
|
||||||
|
|
7
lib/syscall/_pm_findproc.s
Normal file
7
lib/syscall/_pm_findproc.s
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
.sect .text
|
||||||
|
.extern ___pm_findproc
|
||||||
|
.define __pm_findproc
|
||||||
|
.align 2
|
||||||
|
|
||||||
|
__pm_findproc:
|
||||||
|
jmp ___pm_findproc
|
|
@ -1,7 +0,0 @@
|
||||||
.sect .text
|
|
||||||
.extern __findproc
|
|
||||||
.define _findproc
|
|
||||||
.align 2
|
|
||||||
|
|
||||||
_findproc:
|
|
||||||
jmp __findproc
|
|
|
@ -20,9 +20,9 @@ char *name;
|
||||||
size_t len;
|
size_t len;
|
||||||
message m;
|
message m;
|
||||||
|
|
||||||
r= findproc("pci", &pci_procnr);
|
r= _pm_findproc("pci", &pci_procnr);
|
||||||
if (r != 0)
|
if (r != 0)
|
||||||
panic("pci", "pci_init1: findproc failed for 'pci'", r);
|
panic("pci", "pci_init1: _pm_findproc failed for 'pci'", r);
|
||||||
|
|
||||||
m.m_type= BUSC_PCI_INIT;
|
m.m_type= BUSC_PCI_INIT;
|
||||||
len= strlen(name);
|
len= strlen(name);
|
||||||
|
|
|
@ -46,7 +46,7 @@ PUBLIC void osdep_eth_init()
|
||||||
#ifdef __minix_vmd
|
#ifdef __minix_vmd
|
||||||
r= sys_findproc(ecp->ec_task, &tasknr, 0);
|
r= sys_findproc(ecp->ec_task, &tasknr, 0);
|
||||||
#else /* Minix 3 */
|
#else /* Minix 3 */
|
||||||
r = findproc(ecp->ec_task, &tasknr);
|
r = _pm_findproc(ecp->ec_task, &tasknr);
|
||||||
#endif
|
#endif
|
||||||
if (r != OK)
|
if (r != OK)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue