summaryrefslogtreecommitdiff
path: root/devel/linuxthreads
diff options
context:
space:
mode:
authorTor Egge <tegge@FreeBSD.org>2002-06-08 18:18:05 +0000
committerTor Egge <tegge@FreeBSD.org>2002-06-08 18:18:05 +0000
commit6e913a0e74f9f235d7dcc1ad96459c40044921e3 (patch)
treeb3ff4b0667e051b3c8c60c3f3cb8be0b036d3c0e /devel/linuxthreads
parentTrack changes in -current (remove register keyword, ansify). (diff)
Remove #pragma weak usage.
Diffstat (limited to 'devel/linuxthreads')
-rw-r--r--devel/linuxthreads/files/freebsd-compat.h14
-rw-r--r--devel/linuxthreads/files/lclone.c7
-rw-r--r--devel/linuxthreads/files/sched.c42
3 files changed, 40 insertions, 23 deletions
diff --git a/devel/linuxthreads/files/freebsd-compat.h b/devel/linuxthreads/files/freebsd-compat.h
index 83041c3dfcff..470cb51827d8 100644
--- a/devel/linuxthreads/files/freebsd-compat.h
+++ b/devel/linuxthreads/files/freebsd-compat.h
@@ -61,12 +61,14 @@
#define __libc_current_sigrtmax current_sigrtmax
#define __libc_allocate_rtsig allocate_rtsig
#define __getpagesize getpagesize
-#define __sched_param sched_param
-#define __sched_get_priority_min sched_get_priority_min
-#define __sched_get_priority_max sched_get_priority_max
-#define __sched_setscheduler sched_setscheduler
-#define __sched_getscheduler sched_getscheduler
-#define __sched_getparam sched_getparam
+int __sched_setparam(pid_t, const struct sched_param *);
+int __sched_getparam(pid_t, struct sched_param *);
+int __sched_setscheduler(pid_t, int, const struct sched_param *);
+int __sched_getscheduler(pid_t);
+int __sched_yield(void);
+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 __jmp_buf jmp_buf
#define _h_errno h_errno
diff --git a/devel/linuxthreads/files/lclone.c b/devel/linuxthreads/files/lclone.c
index a020342fda8f..35623bbed0f0 100644
--- a/devel/linuxthreads/files/lclone.c
+++ b/devel/linuxthreads/files/lclone.c
@@ -38,10 +38,11 @@
#include <errno.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,
- int __flags, void *__arg))
+extern int __clone (int (*__fn) (void *), void *__child_stack,
+ int __flags, void *__arg)
{
int bsd_flags;
int exit_signal;
diff --git a/devel/linuxthreads/files/sched.c b/devel/linuxthreads/files/sched.c
index f73eb5081ec6..bd543fd65789 100644
--- a/devel/linuxthreads/files/sched.c
+++ b/devel/linuxthreads/files/sched.c
@@ -155,7 +155,7 @@ int __sched_rr_get_interval(pid_t pid, struct timespec *interval)
int _getpriority __P((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);
@@ -163,9 +163,11 @@ int sched_setparam(pid_t pid, const struct sched_param *param)
return (-1);
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)
{
struct rtprio rtp;
@@ -213,9 +215,12 @@ int sched_setscheduler(pid_t pid, int policy,
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;
struct rtprio rtp;
@@ -238,9 +243,11 @@ int sched_getscheduler(pid_t pid)
}
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)
{
@@ -256,9 +263,11 @@ int sched_get_priority_max(int policy)
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)
{
@@ -274,10 +283,12 @@ int sched_get_priority_min(int policy)
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;
struct rtprio rtp;
@@ -303,9 +314,11 @@ int sched_getparam(pid_t pid, struct sched_param *param)
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)
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