Remove #pragma weak usage.

This commit is contained in:
Tor Egge 2002-06-08 18:18:05 +00:00
parent 5454751631
commit 6e913a0e74
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=60877
3 changed files with 40 additions and 23 deletions

View file

@ -61,12 +61,14 @@
#define __libc_current_sigrtmax current_sigrtmax #define __libc_current_sigrtmax current_sigrtmax
#define __libc_allocate_rtsig allocate_rtsig #define __libc_allocate_rtsig allocate_rtsig
#define __getpagesize getpagesize #define __getpagesize getpagesize
#define __sched_param sched_param int __sched_setparam(pid_t, const struct sched_param *);
#define __sched_get_priority_min sched_get_priority_min int __sched_getparam(pid_t, struct sched_param *);
#define __sched_get_priority_max sched_get_priority_max int __sched_setscheduler(pid_t, int, const struct sched_param *);
#define __sched_setscheduler sched_setscheduler int __sched_getscheduler(pid_t);
#define __sched_getscheduler sched_getscheduler int __sched_yield(void);
#define __sched_getparam sched_getparam int __sched_get_priority_max(int);
int __sched_get_priority_min(int);
int __sched_rr_get_interval(pid_t, struct timespec *);
#define __gettimeofday _gettimeofday #define __gettimeofday _gettimeofday
#define __jmp_buf jmp_buf #define __jmp_buf jmp_buf
#define _h_errno h_errno #define _h_errno h_errno

View file

@ -38,10 +38,11 @@
#include <errno.h> #include <errno.h>
#include <clone.h> #include <clone.h>
#pragma weak clone=__clone int clone (int (*__fn) (void *), void *__child_stack,
int __flags, void *__arg) __attribute__ ((weak, alias("__clone")));
extern int __clone __P ((int (*__fn) (void *), void *__child_stack, extern int __clone (int (*__fn) (void *), void *__child_stack,
int __flags, void *__arg)) int __flags, void *__arg)
{ {
int bsd_flags; int bsd_flags;
int exit_signal; int exit_signal;

View file

@ -155,7 +155,7 @@ int __sched_rr_get_interval(pid_t pid, struct timespec *interval)
int _getpriority __P((int, int)); int _getpriority __P((int, int));
int _setpriority __P((int, int, int)); int _setpriority __P((int, int, int));
int sched_setparam(pid_t pid, const struct sched_param *param) int __sched_setparam(pid_t pid, const struct sched_param *param)
{ {
int policy = __sched_getscheduler (pid); int policy = __sched_getscheduler (pid);
@ -163,9 +163,11 @@ int sched_setparam(pid_t pid, const struct sched_param *param)
return (-1); return (-1);
return (__sched_setscheduler (pid, policy, param)); return (__sched_setscheduler (pid, policy, param));
} }
#pragma weak __sched_setparam=sched_setparam
int sched_setscheduler(pid_t pid, int policy, int sched_setparam(pid_t pid, const struct sched_param *param)
__attribute__ ((weak, alias("__sched_setparam")));
int __sched_setscheduler(pid_t pid, int policy,
const struct sched_param *param) const struct sched_param *param)
{ {
struct rtprio rtp; struct rtprio rtp;
@ -213,9 +215,12 @@ int sched_setscheduler(pid_t pid, int policy,
return (-1); return (-1);
} }
} }
#pragma weak __sched_setscheduler=sched_setscheduler
int sched_getscheduler(pid_t pid) int sched_setscheduler(pid_t pid, int policy,
const struct sched_param *param)
__attribute__ ((weak, alias("__sched_setscheduler")));
int __sched_getscheduler(pid_t pid)
{ {
int ret; int ret;
struct rtprio rtp; struct rtprio rtp;
@ -238,9 +243,11 @@ int sched_getscheduler(pid_t pid)
} }
return (ret); return (ret);
} }
#pragma weak __sched_getscheduler=sched_getscheduler
int sched_get_priority_max(int policy) int sched_getscheduler(pid_t pid)
__attribute__ ((weak, alias("__sched_getscheduler")));
int __sched_get_priority_max(int policy)
{ {
switch (policy) switch (policy)
{ {
@ -256,9 +263,11 @@ int sched_get_priority_max(int policy)
return (-1); return (-1);
} }
} }
#pragma weak __sched_get_priority_max=sched_get_priority_max
int sched_get_priority_min(int policy) int sched_get_priority_max(int policy)
__attribute__ ((weak, alias("__sched_get_priority_max")));
int __sched_get_priority_min(int policy)
{ {
switch (policy) switch (policy)
{ {
@ -274,10 +283,12 @@ int sched_get_priority_min(int policy)
return (-1); return (-1);
} }
} }
#pragma weak __sched_get_priority_min=sched_get_priority_min
int sched_get_priority_min(int policy)
__attribute__ ((weak, alias("__sched_get_priority_min")));
int sched_getparam(pid_t pid, struct sched_param *param) int __sched_getparam(pid_t pid, struct sched_param *param)
{ {
int ret = 0; int ret = 0;
struct rtprio rtp; struct rtprio rtp;
@ -303,9 +314,11 @@ int sched_getparam(pid_t pid, struct sched_param *param)
return (ret); return (ret);
} }
#pragma weak __sched_getparam=sched_getparam
int sched_rr_get_interval(pid_t pid, struct timespec *interval) int sched_getparam(pid_t pid, struct sched_param *param)
__attribute__ ((weak, alias("__sched_getparam")));
int __sched_rr_get_interval(pid_t pid, struct timespec *interval)
{ {
if (_posix_priority_scheduling) if (_posix_priority_scheduling)
return (_sched_rr_get_interval(pid, interval)); return (_sched_rr_get_interval(pid, interval));
@ -315,6 +328,7 @@ int sched_rr_get_interval(pid_t pid, struct timespec *interval)
} }
} }
#pragma weak __sched_rr_get_interval=sched_rr_get_interval int sched_rr_get_interval(pid_t pid, struct timespec *interval)
__attribute__ ((weak, alias("__sched_rr_get_interval")));
#endif #endif