1 nptl: remove duplicate vfork() in libpthread
3 Automatic patching via two oneliners by Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>:
4 sed -i -e 's/[[:space:]]pt-vfork\.[csS]//' $(git grep -l pt-vfork libpthread/nptl/sysdeps)
5 find libpthread/nptl -name "*pt-vfork*" -exec git rm {} \;
7 Reported-By: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
8 Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
10 .../nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S | 43 --------------
11 .../nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch | 2 +-
12 .../nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S | 38 ------------
13 .../sysdeps/unix/sysv/linux/i386/Makefile.arch | 2 +-
14 .../nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S | 68 ----------------------
15 .../sysdeps/unix/sysv/linux/mips/Makefile.arch | 2 +-
16 .../nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S | 38 ------------
17 .../sysdeps/unix/sysv/linux/powerpc/Makefile.arch | 2 +-
18 .../unix/sysv/linux/powerpc/powerpc32/pt-vfork.S | 49 ----------------
19 .../unix/sysv/linux/powerpc/powerpc64/pt-vfork.S | 49 ----------------
20 .../sysdeps/unix/sysv/linux/powerpc/pt-vfork.S | 5 --
21 .../nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch | 2 +-
22 .../nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S | 65 ---------------------
23 .../sysdeps/unix/sysv/linux/sparc/Makefile.arch | 2 +-
24 .../nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S | 5 --
25 .../unix/sysv/linux/sparc/sparc32/pt-vfork.S | 45 --------------
26 .../unix/sysv/linux/sparc/sparc64/pt-vfork.S | 45 --------------
27 .../sysdeps/unix/sysv/linux/x86_64/Makefile.arch | 2 +-
28 .../nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S | 33 -----------
29 19 files changed, 7 insertions(+), 490 deletions(-)
30 delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S
31 delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S
32 delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S
33 delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S
34 delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S
35 delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S
36 delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-vfork.S
37 delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S
38 delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S
39 delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S
40 delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S
41 delete mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S
43 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S
44 deleted file mode 100644
45 index ec5d175..0000000
46 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/alpha/pt-vfork.S
49 -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
50 - This file is part of the GNU C Library.
52 - The GNU C Library is free software; you can redistribute it and/or
53 - modify it under the terms of the GNU Lesser General Public
54 - License as published by the Free Software Foundation; either
55 - version 2.1 of the License, or (at your option) any later version.
57 - The GNU C Library is distributed in the hope that it will be useful,
58 - but WITHOUT ANY WARRANTY; without even the implied warranty of
59 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
60 - Lesser General Public License for more details.
62 - You should have received a copy of the GNU Lesser General Public
63 - License along with the GNU C Library; if not, write to the Free
64 - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
68 -#include <tcb-offsets.h>
70 -#undef PSEUDO_PREPARE_ARGS
71 -#define PSEUDO_PREPARE_ARGS \
72 - /* Load the current cached pid value across the vfork. */ \
74 - ldl a2, PID_OFFSET(v0); \
76 - /* Write back its negation, to indicate that the pid value is \
77 - uninitialized in the the child, and in the window between \
78 - here and the point at which we restore the value. */ \
80 - stl t0, PID_OFFSET(v0);
82 -PSEUDO (__vfork, vfork, 0)
84 - /* If we're back in the parent, restore the saved pid. */
86 - stl a2, PID_OFFSET(a1)
91 -weak_alias (__vfork, vfork)
92 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
93 index 329d8a9..1b0282d 100644
94 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
95 +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/Makefile.arch
97 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
100 -libpthread_linux_arch_SSRC = pt-vfork.S
101 +libpthread_linux_arch_SSRC =
102 libpthread_linux_arch_CSRC = pthread_once.c \
103 pt-__syscall_rt_sigaction.c pt-__syscall_error.c \
105 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S
106 deleted file mode 100644
107 index 9764e9e..0000000
108 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/arm/pt-vfork.S
111 -/* Copyright (C) 2005 Free Software Foundation, Inc.
112 - This file is part of the GNU C Library.
114 - The GNU C Library is free software; you can redistribute it and/or
115 - modify it under the terms of the GNU Lesser General Public
116 - License as published by the Free Software Foundation; either
117 - version 2.1 of the License, or (at your option) any later version.
119 - The GNU C Library is distributed in the hope that it will be useful,
120 - but WITHOUT ANY WARRANTY; without even the implied warranty of
121 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
122 - Lesser General Public License for more details.
124 - You should have received a copy of the GNU Lesser General Public
125 - License along with the GNU C Library; if not, write to the Free
126 - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
129 -#include <tcb-offsets.h>
131 -/* Save the PID value. */
133 - str lr, [sp, #-4]!; /* Save LR. */ \
134 - mov r0, #0xffff0fff; /* Point to the high page. */ \
135 - mov lr, pc; /* Save our return address. */ \
136 - sub pc, r0, #31; /* Jump to the TLS entry. */ \
137 - ldr lr, [sp], #4; /* Restore LR. */ \
138 - mov r2, r0; /* Save the TLS addr in r2. */ \
139 - ldr r3, [r2, #PID_OFFSET]; /* Load the saved PID. */ \
140 - rsb r0, r3, #0; /* Negate it. */ \
141 - str r0, [r2, #PID_OFFSET] /* Store the temporary PID. */
143 -/* Restore the old PID value in the parent. */
144 -#define RESTORE_PID \
145 - cmp r0, #0; /* If we are the parent... */ \
146 - strne r3, [r2, #PID_OFFSET] /* ... restore the saved PID. */
148 -#INCLUDE <../../../../../../../LIBC/SYSDEPS/LINUX/ARM/VFORK.S>
149 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch
150 index 9a34595..98e2ae7 100644
151 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch
152 +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/Makefile.arch
154 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
157 -libpthread_linux_arch_SSRC = pt-vfork.S clone.S pthread_spin_unlock.S pthread_once.S
158 +libpthread_linux_arch_SSRC = clone.S pthread_spin_unlock.S pthread_once.S
159 libpthread_linux_arch_CSRC = pthread_spin_init.c pt-__syscall_error.c
161 libc_linux_arch_CSRC = fork.c
162 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S
163 deleted file mode 100644
164 index aff926a..0000000
165 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/i386/pt-vfork.S
168 -/* Copyright (C) 1999, 2002, 2004 Free Software Foundation, Inc.
169 - This file is part of the GNU C Library.
170 - Contributed by Andreas Schwab <schwab@gnu.org>.
172 - The GNU C Library is free software; you can redistribute it and/or
173 - modify it under the terms of the GNU Lesser General Public
174 - License as published by the Free Software Foundation; either
175 - version 2.1 of the License, or (at your option) any later version.
177 - The GNU C Library is distributed in the hope that it will be useful,
178 - but WITHOUT ANY WARRANTY; without even the implied warranty of
179 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
180 - Lesser General Public License for more details.
182 - You should have received a copy of the GNU Lesser General Public
183 - License along with the GNU C Library; if not, write to the Free
184 - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
189 -#include <bits/errno.h>
190 -#include <bits/kernel-features.h>
191 -#include <tcb-offsets.h>
193 -/* Save the PID value. */
195 - movl %gs:PID, %edx; \
200 -/* Restore the old PID value in the parent. */
201 -#define RESTORE_PID \
202 - testl %eax, %eax; \
204 - movl %edx, %gs:PID; \
207 -/* Clone the calling process, but without copying the whole address space.
208 - The calling process is suspended until the new process exits or is
209 - replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
210 - and the process ID of the new process to the old process. */
213 - /* Pop the return PC value into ECX. */
218 - /* Stuff the syscall number in EAX and enter into the kernel. */
219 - movl $SYS_ify (vfork), %eax
224 - /* Jump to the return PC. Don't jump directly since this
225 - disturbs the branch target cache. Instead push the return
226 - address back on the stack. */
230 - jae SYSCALL_ERROR_LABEL /* Branch forward if it failed. */
233 -PSEUDO_END (__vfork)
235 -weak_alias (__vfork, vfork)
236 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
237 index fc26a8e..cfe2861 100644
238 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
239 +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/Makefile.arch
241 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
244 -libpthread_linux_arch_SSRC = pt-vfork.S clone.S
245 +libpthread_linux_arch_SSRC = clone.S
246 libpthread_linux_arch_CSRC = pthread_once.c pt-__syscall_rt_sigaction.c
248 libc_linux_arch_CSRC = fork.c
249 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S
250 deleted file mode 100644
251 index c02ffca..0000000
252 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/mips/pt-vfork.S
255 -/* Copyright (C) 2005 Free Software Foundation, Inc.
256 - This file is part of the GNU C Library.
258 - The GNU C Library is free software; you can redistribute it and/or
259 - modify it under the terms of the GNU Lesser General Public
260 - License as published by the Free Software Foundation; either
261 - version 2.1 of the License, or (at your option) any later version.
263 - The GNU C Library is distributed in the hope that it will be useful,
264 - but WITHOUT ANY WARRANTY; without even the implied warranty of
265 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
266 - Lesser General Public License for more details.
268 - You should have received a copy of the GNU Lesser General Public
269 - License along with the GNU C Library; if not, write to the Free
270 - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
273 -#include <features.h>
276 -/* Save the PID value. */
278 - READ_THREAD_POINTER(v1); /* Get the thread pointer. */ \
279 - lw a2, PID_OFFSET(v1); /* Load the saved PID. */ \
280 - subu a2, $0, a2; /* Negate it. */ \
281 - sw a2, PID_OFFSET(v1); /* Store the temporary PID. */
283 -/* Restore the old PID value in the parent. */
284 -#define RESTORE_PID \
285 - beqz v0, 1f; /* If we are the parent... */ \
286 - READ_THREAD_POINTER(v1); /* Get the thread pointer. */ \
287 - lw a2, PID_OFFSET(v1); /* Load the saved PID. */ \
288 - subu a2, $0, a2; /* Re-negate it. */ \
289 - sw a2, PID_OFFSET(v1); /* Restore the PID. */ \
292 -#include <../../../../../../../libc/sysdeps/linux/mips/vfork.S>
293 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch
294 index 8581aea..0aa285e 100644
295 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch
296 +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/Makefile.arch
298 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
301 -libpthread_linux_arch_SSRC = pt-vfork.S
302 +libpthread_linux_arch_SSRC =
303 libpthread_linux_arch_CSRC = pthread_once.c pt-__syscall_error.c
305 libc_linux_arch_CSRC = fork.c
306 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S
307 deleted file mode 100644
308 index 61651fd..0000000
309 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S
312 -/* Copyright (C) 2004 Free Software Foundation, Inc.
313 - This file is part of the GNU C Library.
314 - Contributed by Jakub Jelinek <jakub@redhat.com>, 2004.
316 - The GNU C Library is free software; you can redistribute it and/or
317 - modify it under the terms of the GNU Lesser General Public
318 - License as published by the Free Software Foundation; either
319 - version 2.1 of the License, or (at your option) any later version.
321 - The GNU C Library is distributed in the hope that it will be useful,
322 - but WITHOUT ANY WARRANTY; without even the implied warranty of
323 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
324 - Lesser General Public License for more details.
326 - You should have received a copy of the GNU Lesser General Public
327 - License along with the GNU C Library; if not, write to the Free
328 - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
333 -#include <bits/errno.h>
334 -#include <bits/kernel-features.h>
335 -#include <tcb-offsets.h>
337 -/* Clone the calling process, but without copying the whole address space.
338 - The calling process is suspended until the new process exits or is
339 - replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
340 - and the process ID of the new process to the old process. */
347 - DO_CALL (SYS_ify (vfork))
358 -PSEUDO_END (__vfork)
360 -weak_alias (__vfork, vfork)
361 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S
362 deleted file mode 100644
363 index e5b7b53..0000000
364 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S
367 -/* Copyright (C) 2004 Free Software Foundation, Inc.
368 - This file is part of the GNU C Library.
369 - Contributed by Jakub Jelinek <jakub@redhat.com>, 2004.
371 - The GNU C Library is free software; you can redistribute it and/or
372 - modify it under the terms of the GNU Lesser General Public
373 - License as published by the Free Software Foundation; either
374 - version 2.1 of the License, or (at your option) any later version.
376 - The GNU C Library is distributed in the hope that it will be useful,
377 - but WITHOUT ANY WARRANTY; without even the implied warranty of
378 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
379 - Lesser General Public License for more details.
381 - You should have received a copy of the GNU Lesser General Public
382 - License along with the GNU C Library; if not, write to the Free
383 - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
388 -#include <bits/errno.h>
389 -#include <bits/kernel-features.h>
390 -#include <tcb-offsets.h>
392 -/* Clone the calling process, but without copying the whole address space.
393 - The calling process is suspended until the new process exits or is
394 - replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
395 - and the process ID of the new process to the old process. */
402 - DO_CALL (SYS_ify (vfork))
413 -PSEUDO_END (__vfork)
415 -weak_alias (__vfork, vfork)
416 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-vfork.S
417 deleted file mode 100644
418 index 0225219..0000000
419 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/powerpc/pt-vfork.S
422 -#if defined __powerpc64__
423 -# include "powerpc64/pt-vfork.S"
425 -# include "powerpc32/pt-vfork.S"
427 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch
428 index a8249e0..a0c008b 100644
429 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch
430 +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/Makefile.arch
432 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
435 -libpthread_linux_arch_SSRC = pt-vfork.S pthread_once.S pthread_rwlock_wrlock.S \
436 +libpthread_linux_arch_SSRC = pthread_once.S pthread_rwlock_wrlock.S \
437 pthread_rwlock_rdlock.S pthread_rwlock_unlock.S \
438 lowlevellock.S lowlevelrobustlock.S pthread_barrier_wait.S \
439 pthread_cond_broadcast.S pthread_cond_signal.S \
440 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S
441 deleted file mode 100644
442 index 54f2281..0000000
443 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sh/pt-vfork.S
446 -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
447 - This file is part of the GNU C Library.
449 - The GNU C Library is free software; you can redistribute it and/or
450 - modify it under the terms of the GNU Lesser General Public
451 - License as published by the Free Software Foundation; either
452 - version 2.1 of the License, or (at your option) any later version.
454 - The GNU C Library is distributed in the hope that it will be useful,
455 - but WITHOUT ANY WARRANTY; without even the implied warranty of
456 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
457 - Lesser General Public License for more details.
459 - You should have received a copy of the GNU Lesser General Public
460 - License along with the GNU C Library; if not, write to the Free
461 - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
466 -#include <bits/errno.h>
467 -#include <tcb-offsets.h>
469 -/* Clone the calling process, but without copying the whole address space.
470 - The calling process is suspended until the new process exits or is
471 - replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
472 - and the process ID of the new process to the old process. */
475 - /* Save the PID value. */
486 - /* Restore the old PID value in the parent. */
496 - not r1, r1 // r1=0 means r0 = -1 to -4095
497 - tst r1, r1 // i.e. error in linux
499 - SYSCALL_ERROR_HANDLER
506 - .word PID - TLS_PRE_TCB_SIZE
508 -PSEUDO_END (__vfork)
510 -weak_alias (__vfork, vfork)
511 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch
512 index 102c0da..8329885 100644
513 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch
514 +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/Makefile.arch
516 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
519 -libpthread_linux_arch_SSRC = pt-vfork.S clone.S
520 +libpthread_linux_arch_SSRC = clone.S
521 libpthread_linux_arch_CSRC = pthread_once.c lowlevellock.c \
522 pthread_barrier_init.c pthread_barrier_wait.c pthread_barrier_destroy.c \
524 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S
525 deleted file mode 100644
526 index e8705c5..0000000
527 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/pt-vfork.S
530 -#if defined(__arch64__)
531 -#include "sparc64/pt-vfork.S"
533 -#include "sparc32/pt-vfork.S"
535 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S
536 deleted file mode 100644
537 index fb01242..0000000
538 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S
541 -/* Copyright (C) 2004 Free Software Foundation, Inc.
542 - This file is part of the GNU C Library.
543 - Contributed by Jakub Jelinek <jakub@redhat.com>, 2004.
545 - The GNU C Library is free software; you can redistribute it and/or
546 - modify it under the terms of the GNU Lesser General Public
547 - License as published by the Free Software Foundation; either
548 - version 2.1 of the License, or (at your option) any later version.
550 - The GNU C Library is distributed in the hope that it will be useful,
551 - but WITHOUT ANY WARRANTY; without even the implied warranty of
552 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
553 - Lesser General Public License for more details.
555 - You should have received a copy of the GNU Lesser General Public
556 - License along with the GNU C Library; if not, write to the Free
557 - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
561 -#include <tcb-offsets.h>
564 - .globl __syscall_error
566 - ld [%g7 + PID], %o5
568 - st %o4, [%g7 + PID]
574 - st %o5, [%g7 + PID]
575 - call __syscall_error
578 - andcc %o0, %o1, %o0
580 - st %o5, [%g7 + PID]
585 -weak_alias (__vfork, vfork)
586 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S
587 deleted file mode 100644
588 index 8941043..0000000
589 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S
592 -/* Copyright (C) 2004 Free Software Foundation, Inc.
593 - This file is part of the GNU C Library.
594 - Contributed by Jakub Jelinek <jakub@redhat.com>, 2004.
596 - The GNU C Library is free software; you can redistribute it and/or
597 - modify it under the terms of the GNU Lesser General Public
598 - License as published by the Free Software Foundation; either
599 - version 2.1 of the License, or (at your option) any later version.
601 - The GNU C Library is distributed in the hope that it will be useful,
602 - but WITHOUT ANY WARRANTY; without even the implied warranty of
603 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
604 - Lesser General Public License for more details.
606 - You should have received a copy of the GNU Lesser General Public
607 - License along with the GNU C Library; if not, write to the Free
608 - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
612 -#include <tcb-offsets.h>
615 - .globl __syscall_error
617 - ld [%g7 + PID], %o5
619 - st %o4, [%g7 + PID]
625 - st %o5, [%g7 + PID]
626 - call __syscall_error
629 - andcc %o0, %o1, %o0
631 - st %o5, [%g7 + PID]
636 -weak_alias (__vfork, vfork)
637 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch
638 index 71df986..10fa3cf 100644
639 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch
640 +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/Makefile.arch
642 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
645 -libpthread_linux_arch_SSRC = pt-vfork.S clone.S pthread_once.S \
646 +libpthread_linux_arch_SSRC = clone.S pthread_once.S \
647 lowlevellock.S pthread_barrier_wait.S pthread_cond_signal.S pthread_cond_broadcast.S \
648 sem_post.S sem_timedwait.S lowlevelrobustlock.S \
649 sem_trywait.S sem_wait.S pthread_rwlock_rdlock.S pthread_rwlock_wrlock.S \
650 diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S b/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S
651 deleted file mode 100644
652 index df49496..0000000
653 --- a/libpthread/nptl/sysdeps/unix/sysv/linux/x86_64/pt-vfork.S
656 -/* Copyright (C) 2004 Free Software Foundation, Inc.
657 - This file is part of the GNU C Library.
659 - The GNU C Library is free software; you can redistribute it and/or
660 - modify it under the terms of the GNU Lesser General Public
661 - License as published by the Free Software Foundation; either
662 - version 2.1 of the License, or (at your option) any later version.
664 - The GNU C Library is distributed in the hope that it will be useful,
665 - but WITHOUT ANY WARRANTY; without even the implied warranty of
666 - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
667 - Lesser General Public License for more details.
669 - You should have received a copy of the GNU Lesser General Public
670 - License along with the GNU C Library; if not, write to the Free
671 - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
674 -#include <tcb-offsets.h>
677 - movl %fs:PID, %esi; \
682 -#define RESTORE_PID \
683 - testq %rax, %rax; \
685 - movl %esi, %fs:PID; \
688 -#include <../../../../../../../libc/sysdeps/linux/x86_64/vfork.S>
690 1.8.5.2 (Apple Git-48)