From da28fa2a447b193788c0ad7a9b3d97e37fc3bf8b Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 17 Mar 2000 09:03:47 +0000 Subject: * sysdeps/mach/sched_yield.c: New file. 2000-03-13 Roland McGrath * sysdeps/generic/lockfile.c: Include (_IO_flockfile, _IO_funlockfile, _IO_ftrylockfile): #undef these in case defined them. (__flockfile, __funlockfile, __ftrylockfile): Functions renamed from __internal_*. (flockfile, _IO_flockfile, funlockfile, _IO_funlockfile, ftrylockfile, _IO_ftrylockfile): Fix aliases accordingly. * sysdeps/generic/bits/stdio-lock.h (_IO_lock_initializer): Use ... for more pleasing parse error. * elf/Makefile: Add rules to compile and run constload1 test. --- sysdeps/generic/bits/stdio-lock.h | 2 +- sysdeps/mach/sched_yield.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 sysdeps/mach/sched_yield.c (limited to 'sysdeps') diff --git a/sysdeps/generic/bits/stdio-lock.h b/sysdeps/generic/bits/stdio-lock.h index 39d5b0b9c9..bcf636de5d 100644 --- a/sysdeps/generic/bits/stdio-lock.h +++ b/sysdeps/generic/bits/stdio-lock.h @@ -25,7 +25,7 @@ __libc_lock_define (typedef, _IO_lock_t) /* We need recursive (counting) mutexes. */ -#define _IO_lock_initializer STUB_LOSER +#define _IO_lock_initializer ... #error libio needs recursive mutexes for _IO_MTSAFE_IO diff --git a/sysdeps/mach/sched_yield.c b/sysdeps/mach/sched_yield.c new file mode 100644 index 0000000000..b4122b7912 --- /dev/null +++ b/sysdeps/mach/sched_yield.c @@ -0,0 +1,31 @@ +/* sched_yield -- yield the processor. Mach version. + Copyright (C) 2000 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include +#include +#include + +/* Yield the processor. */ +int +__sched_yield (void) +{ + (void) __swtch (); + return 0; +} +weak_alias (__sched_yield, sched_yield) -- cgit 1.4.1