0003-linuxthreads-remove-unused-s390-code.patch 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347
  1. From d72e888957d32984c56e19e43a3c3b41263c7bb4 Mon Sep 17 00:00:00 2001
  2. From: Waldemar Brodkorb <wbx@openadk.org>
  3. Date: Sat, 6 Sep 2014 14:45:42 +0200
  4. Subject: [PATCH 3/6] linuxthreads: remove unused s390 code
  5. Cleanup linuxthreads by removing unused s390 code.
  6. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
  7. ---
  8. libc/stdlib/system.c | 3 -
  9. libpthread/linuxthreads/sysdeps/s390/pspinlock.c | 90 ------------
  10. .../linuxthreads/sysdeps/s390/s390-32/pt-machine.h | 119 ----------------
  11. .../linuxthreads/sysdeps/s390/s390-64/pt-machine.h | 124 -----------------
  12. .../linuxthreads/sysdeps/s390/tcb-offsets.sym | 4 -
  13. libpthread/linuxthreads/sysdeps/s390/tls.h | 144 -------------------
  14. .../sysdeps/unix/sysv/linux/s390/bits/typesizes.h | 71 ----------
  15. .../unix/sysv/linux/s390/s390-32/pt-initfini.c | 153 ---------------------
  16. .../unix/sysv/linux/s390/s390-32/sysdep-cancel.h | 136 ------------------
  17. .../sysdeps/unix/sysv/linux/s390/s390-32/vfork.S | 68 ---------
  18. .../unix/sysv/linux/s390/s390-64/pt-initfini.c | 136 ------------------
  19. .../unix/sysv/linux/s390/s390-64/pt-sigsuspend.c | 1 -
  20. .../unix/sysv/linux/s390/s390-64/sysdep-cancel.h | 115 ----------------
  21. .../sysdeps/unix/sysv/linux/s390/s390-64/vfork.S | 53 -------
  22. 14 files changed, 1217 deletions(-)
  23. delete mode 100644 libpthread/linuxthreads/sysdeps/s390/pspinlock.c
  24. delete mode 100644 libpthread/linuxthreads/sysdeps/s390/s390-32/pt-machine.h
  25. delete mode 100644 libpthread/linuxthreads/sysdeps/s390/s390-64/pt-machine.h
  26. delete mode 100644 libpthread/linuxthreads/sysdeps/s390/tcb-offsets.sym
  27. delete mode 100644 libpthread/linuxthreads/sysdeps/s390/tls.h
  28. delete mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/bits/typesizes.h
  29. delete mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c
  30. delete mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
  31. delete mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S
  32. delete mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c
  33. delete mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c
  34. delete mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
  35. delete mode 100644 libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S
  36. diff --git a/libc/stdlib/system.c b/libc/stdlib/system.c
  37. index 8c5d25d..05b6738 100644
  38. --- a/libc/stdlib/system.c
  39. +++ b/libc/stdlib/system.c
  40. @@ -91,9 +91,6 @@ libc_hidden_proto(waitpid)
  41. #elif defined __sparc__
  42. # define FORK() \
  43. INLINE_CLONE_SYSCALL (CLONE_PARENT_SETTID | SIGCHLD, 0, &pid, NULL, NULL)
  44. -#elif defined __s390__
  45. -# define FORK() \
  46. - INLINE_SYSCALL (clone, 3, 0, CLONE_PARENT_SETTID | SIGCHLD, &pid)
  47. #else
  48. # define FORK() \
  49. INLINE_SYSCALL (clone, 3, CLONE_PARENT_SETTID | SIGCHLD, 0, &pid)
  50. diff --git a/libpthread/linuxthreads/sysdeps/s390/pspinlock.c b/libpthread/linuxthreads/sysdeps/s390/pspinlock.c
  51. deleted file mode 100644
  52. index be75786..0000000
  53. --- a/libpthread/linuxthreads/sysdeps/s390/pspinlock.c
  54. +++ /dev/null
  55. @@ -1,90 +0,0 @@
  56. -/* POSIX spinlock implementation. S/390 version.
  57. - Copyright (C) 2000, 2004 Free Software Foundation, Inc.
  58. - Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
  59. - This file is part of the GNU C Library.
  60. -
  61. - The GNU C Library is free software; you can redistribute it and/or
  62. - modify it under the terms of the GNU Lesser General Public License as
  63. - published by the Free Software Foundation; either version 2.1 of the
  64. - License, or (at your option) any later version.
  65. -
  66. - The GNU C Library is distributed in the hope that it will be useful,
  67. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  68. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  69. - Lesser General Public License for more details.
  70. -
  71. - You should have received a copy of the GNU Lesser General Public
  72. - License along with the GNU C Library; see the file COPYING.LIB. If
  73. - not, see <http://www.gnu.org/licenses/>. */
  74. -
  75. -#include <errno.h>
  76. -#include <pthread.h>
  77. -#include "internals.h"
  78. -
  79. -/* This implementation is similar to the one used in the Linux kernel.
  80. - But the kernel is byte instructions for the memory access. This is
  81. - faster but unusable here. The problem is that only 128
  82. - threads/processes could use the spinlock at the same time. If (by
  83. - a design error in the program) a thread/process would hold the
  84. - spinlock for a time long enough to accumulate 128 waiting
  85. - processes, the next one will find a positive value in the spinlock
  86. - and assume it is unlocked. We cannot accept that. */
  87. -
  88. -int
  89. -__pthread_spin_lock (pthread_spinlock_t *lock)
  90. -{
  91. - __asm__ __volatile__(" basr 1,0\n"
  92. - "0: slr 0,0\n"
  93. - " cs 0,1,%1\n"
  94. - " jl 0b\n"
  95. - : "=m" (*lock)
  96. - : "m" (*lock) : "0", "1", "cc" );
  97. - return 0;
  98. -}
  99. -weak_alias (__pthread_spin_lock, pthread_spin_lock)
  100. -
  101. -int
  102. -__pthread_spin_trylock (pthread_spinlock_t *lock)
  103. -{
  104. - int oldval;
  105. -
  106. - __asm__ __volatile__(" slr %1,%1\n"
  107. - " basr 1,0\n"
  108. - "0: cs %1,1,%0"
  109. - : "=m" (*lock), "=&d" (oldval)
  110. - : "m" (*lock) : "1", "cc" );
  111. - return oldval == 0 ? 0 : EBUSY;
  112. -}
  113. -weak_alias (__pthread_spin_trylock, pthread_spin_trylock)
  114. -
  115. -
  116. -int
  117. -__pthread_spin_unlock (pthread_spinlock_t *lock)
  118. -{
  119. - __asm__ __volatile__(" xc 0(4,%0),0(%0)\n"
  120. - " bcr 15,0"
  121. - : : "a" (lock) : "memory" );
  122. - return 0;
  123. -}
  124. -weak_alias (__pthread_spin_unlock, pthread_spin_unlock)
  125. -
  126. -
  127. -int
  128. -__pthread_spin_init (pthread_spinlock_t *lock, int pshared)
  129. -{
  130. - /* We can ignore the `pshared' parameter. Since we are busy-waiting
  131. - all processes which can access the memory location `lock' points
  132. - to can use the spinlock. */
  133. - *lock = 0;
  134. - return 0;
  135. -}
  136. -weak_alias (__pthread_spin_init, pthread_spin_init)
  137. -
  138. -
  139. -int
  140. -__pthread_spin_destroy (pthread_spinlock_t *lock)
  141. -{
  142. - /* Nothing to do. */
  143. - return 0;
  144. -}
  145. -weak_alias (__pthread_spin_destroy, pthread_spin_destroy)
  146. diff --git a/libpthread/linuxthreads/sysdeps/s390/s390-32/pt-machine.h b/libpthread/linuxthreads/sysdeps/s390/s390-32/pt-machine.h
  147. deleted file mode 100644
  148. index 51505a9..0000000
  149. --- a/libpthread/linuxthreads/sysdeps/s390/s390-32/pt-machine.h
  150. +++ /dev/null
  151. @@ -1,119 +0,0 @@
  152. -/* Machine-dependent pthreads configuration and inline functions.
  153. - S390 version.
  154. - Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
  155. - Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
  156. - This file is part of the GNU C Library.
  157. -
  158. - The GNU C Library is free software; you can redistribute it and/or
  159. - modify it under the terms of the GNU Lesser General Public License as
  160. - published by the Free Software Foundation; either version 2.1 of the
  161. - License, or (at your option) any later version.
  162. -
  163. - The GNU C Library is distributed in the hope that it will be useful,
  164. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  165. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  166. - Lesser General Public License for more details.
  167. -
  168. - You should have received a copy of the GNU Lesser General Public
  169. - License along with the GNU C Library; see the file COPYING.LIB. If
  170. - not, see <http://www.gnu.org/licenses/>. */
  171. -
  172. -#ifndef _PT_MACHINE_H
  173. -#define _PT_MACHINE_H 1
  174. -
  175. -#ifndef PT_EI
  176. -# define PT_EI __extern_always_inline
  177. -#endif
  178. -
  179. -extern long int testandset (int *spinlock);
  180. -extern int __compare_and_swap (long int *p, long int oldval, long int newval);
  181. -
  182. -/* For multiprocessor systems, we want to ensure all memory accesses
  183. - are completed before we reset a lock. On other systems, we still
  184. - need to make sure that the compiler has flushed everything to memory. */
  185. -#define MEMORY_BARRIER() __asm__ __volatile__ ("bcr 15,0" : : : "memory")
  186. -
  187. -/* Spinlock implementation; required. */
  188. -PT_EI long int
  189. -testandset (int *spinlock)
  190. -{
  191. - int ret;
  192. -
  193. - __asm__ __volatile__(
  194. - " la 1,%1\n"
  195. - " lhi 0,1\n"
  196. - " l %0,%1\n"
  197. - "0: cs %0,0,0(1)\n"
  198. - " jl 0b"
  199. - : "=&d" (ret), "+m" (*spinlock)
  200. - : : "0", "1", "cc");
  201. -
  202. - return ret;
  203. -}
  204. -
  205. -
  206. -/* Get some notion of the current stack. Need not be exactly the top
  207. - of the stack, just something somewhere in the current frame. */
  208. -#define CURRENT_STACK_FRAME stack_pointer
  209. -register char * stack_pointer __asm__ ("15");
  210. -
  211. -#ifdef __UCLIBC_HAS_TLS__
  212. -/* Return the thread descriptor for the current thread. */
  213. -# define THREAD_SELF ((pthread_descr) __builtin_thread_pointer ())
  214. -
  215. -/* Initialize the thread-unique value. */
  216. -#define INIT_THREAD_SELF(descr, nr) __builtin_set_thread_pointer (descr)
  217. -#else
  218. -/* Return the thread descriptor for the current thread.
  219. - S/390 registers uses access register 0 as "thread register". */
  220. -#define THREAD_SELF ({ \
  221. - register pthread_descr __self; \
  222. - __asm__ ("ear %0,%%a0" : "=d" (__self) ); \
  223. - __self; \
  224. -})
  225. -
  226. -/* Initialize the thread-unique value. */
  227. -#define INIT_THREAD_SELF(descr, nr) ({ \
  228. - __asm__ ("sar %%a0,%0" : : "d" (descr) ); \
  229. -})
  230. -#endif
  231. -
  232. -/* Access to data in the thread descriptor is easy. */
  233. -#define THREAD_GETMEM(descr, member) \
  234. - ((void) sizeof (descr), THREAD_SELF->member)
  235. -#define THREAD_GETMEM_NC(descr, member) \
  236. - ((void) sizeof (descr), THREAD_SELF->member)
  237. -#define THREAD_SETMEM(descr, member, value) \
  238. - ((void) sizeof (descr), THREAD_SELF->member = (value))
  239. -#define THREAD_SETMEM_NC(descr, member, value) \
  240. - ((void) sizeof (descr), THREAD_SELF->member = (value))
  241. -
  242. -/* We want the OS to assign stack addresses. */
  243. -#define FLOATING_STACKS 1
  244. -
  245. -/* Maximum size of the stack if the rlimit is unlimited. */
  246. -#define ARCH_STACK_MAX_SIZE 8*1024*1024
  247. -
  248. -/* Compare-and-swap for semaphores. */
  249. -
  250. -#define HAS_COMPARE_AND_SWAP
  251. -
  252. -PT_EI int
  253. -__compare_and_swap(long int *p, long int oldval, long int newval)
  254. -{
  255. - int retval;
  256. -
  257. - __asm__ __volatile__(
  258. - " la 1,%1\n"
  259. - " lr 0,%2\n"
  260. - " cs 0,%3,0(1)\n"
  261. - " ipm %0\n"
  262. - " srl %0,28\n"
  263. - "0:"
  264. - : "=&d" (retval), "+m" (*p)
  265. - : "d" (oldval) , "d" (newval)
  266. - : "cc", "0", "1" );
  267. - return retval == 0;
  268. -}
  269. -
  270. -#endif /* pt-machine.h */
  271. diff --git a/libpthread/linuxthreads/sysdeps/s390/s390-64/pt-machine.h b/libpthread/linuxthreads/sysdeps/s390/s390-64/pt-machine.h
  272. deleted file mode 100644
  273. index 4bff85a..0000000
  274. --- a/libpthread/linuxthreads/sysdeps/s390/s390-64/pt-machine.h
  275. +++ /dev/null
  276. @@ -1,124 +0,0 @@
  277. -/* Machine-dependent pthreads configuration and inline functions.
  278. - 64 bit S/390 version.
  279. - Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
  280. - Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
  281. - This file is part of the GNU C Library.
  282. -
  283. - The GNU C Library is free software; you can redistribute it and/or
  284. - modify it under the terms of the GNU Lesser General Public License as
  285. - published by the Free Software Foundation; either version 2.1 of the
  286. - License, or (at your option) any later version.
  287. -
  288. - The GNU C Library is distributed in the hope that it will be useful,
  289. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  290. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  291. - Lesser General Public License for more details.
  292. -
  293. - You should have received a copy of the GNU Lesser General Public
  294. - License along with the GNU C Library; see the file COPYING.LIB. If
  295. - not, see <http://www.gnu.org/licenses/>. */
  296. -
  297. -#ifndef _PT_MACHINE_H
  298. -#define _PT_MACHINE_H 1
  299. -
  300. -#ifndef PT_EI
  301. -# define PT_EI __extern_always_inline
  302. -#endif
  303. -
  304. -extern long int testandset (int *spinlock);
  305. -extern int __compare_and_swap (long int *p, long int oldval, long int newval);
  306. -
  307. -/* For multiprocessor systems, we want to ensure all memory accesses
  308. - are completed before we reset a lock. On other systems, we still
  309. - need to make sure that the compiler has flushed everything to memory. */
  310. -#define MEMORY_BARRIER() __asm__ __volatile__ ("bcr 15,0" : : : "memory")
  311. -
  312. -/* Spinlock implementation; required. */
  313. -PT_EI long int
  314. -testandset (int *spinlock)
  315. -{
  316. - int ret;
  317. -
  318. - __asm__ __volatile__(
  319. - " la 1,%1\n"
  320. - " lhi 0,1\n"
  321. - " l %0,%1\n"
  322. - "0: cs %0,0,0(1)\n"
  323. - " jl 0b"
  324. - : "=&d" (ret), "+m" (*spinlock)
  325. - : : "0", "1", "cc");
  326. -
  327. - return ret;
  328. -}
  329. -
  330. -
  331. -/* Get some notion of the current stack. Need not be exactly the top
  332. - of the stack, just something somewhere in the current frame. */
  333. -#define CURRENT_STACK_FRAME stack_pointer
  334. -register char * stack_pointer __asm__ ("15");
  335. -
  336. -#ifdef __UCLIBC_HAS_TLS__
  337. -/* Return the thread descriptor for the current thread. */
  338. -# define THREAD_SELF ((pthread_descr) __builtin_thread_pointer ())
  339. -
  340. -/* Initialize the thread-unique value. */
  341. -#define INIT_THREAD_SELF(descr, nr) __builtin_set_thread_pointer (descr)
  342. -#else
  343. -/* Return the thread descriptor for the current thread.
  344. - 64 bit S/390 uses access register 0 and 1 as "thread register". */
  345. -#define THREAD_SELF ({ \
  346. - register pthread_descr __self; \
  347. - __asm__ (" ear %0,%%a0\n" \
  348. - " sllg %0,%0,32\n" \
  349. - " ear %0,%%a1\n" \
  350. - : "=d" (__self) ); \
  351. - __self; \
  352. -})
  353. -
  354. -/* Initialize the thread-unique value. */
  355. -#define INIT_THREAD_SELF(descr, nr) ({ \
  356. - __asm__ (" sar %%a1,%0\n" \
  357. - " srlg 0,%0,32\n" \
  358. - " sar %%a0,0\n" \
  359. - : : "d" (descr) : "0" ); \
  360. -})
  361. -#endif
  362. -
  363. -/* Access to data in the thread descriptor is easy. */
  364. -#define THREAD_GETMEM(descr, member) \
  365. - ((void) sizeof (descr), THREAD_SELF->member)
  366. -#define THREAD_GETMEM_NC(descr, member) \
  367. - ((void) sizeof (descr), THREAD_SELF->member)
  368. -#define THREAD_SETMEM(descr, member, value) \
  369. - ((void) sizeof (descr), THREAD_SELF->member = (value))
  370. -#define THREAD_SETMEM_NC(descr, member, value) \
  371. - ((void) sizeof (descr), THREAD_SELF->member = (value))
  372. -
  373. -/* We want the OS to assign stack addresses. */
  374. -#define FLOATING_STACKS 1
  375. -
  376. -/* Maximum size of the stack if the rlimit is unlimited. */
  377. -#define ARCH_STACK_MAX_SIZE 8*1024*1024
  378. -
  379. -/* Compare-and-swap for semaphores. */
  380. -
  381. -#define HAS_COMPARE_AND_SWAP
  382. -
  383. -PT_EI int
  384. -__compare_and_swap(long int *p, long int oldval, long int newval)
  385. -{
  386. - int retval;
  387. -
  388. - __asm__ __volatile__(
  389. - " lgr 0,%2\n"
  390. - " csg 0,%3,%1\n"
  391. - " ipm %0\n"
  392. - " srl %0,28\n"
  393. - "0:"
  394. - : "=&d" (retval), "+m" (*p)
  395. - : "d" (oldval) , "d" (newval)
  396. - : "cc", "0");
  397. - return retval == 0;
  398. -}
  399. -
  400. -#endif /* pt-machine.h */
  401. diff --git a/libpthread/linuxthreads/sysdeps/s390/tcb-offsets.sym b/libpthread/linuxthreads/sysdeps/s390/tcb-offsets.sym
  402. deleted file mode 100644
  403. index aee6be2..0000000
  404. --- a/libpthread/linuxthreads/sysdeps/s390/tcb-offsets.sym
  405. +++ /dev/null
  406. @@ -1,4 +0,0 @@
  407. -#include <sysdep.h>
  408. -#include <tls.h>
  409. -
  410. -MULTIPLE_THREADS_OFFSET offsetof (tcbhead_t, multiple_threads)
  411. diff --git a/libpthread/linuxthreads/sysdeps/s390/tls.h b/libpthread/linuxthreads/sysdeps/s390/tls.h
  412. deleted file mode 100644
  413. index d987bdb..0000000
  414. --- a/libpthread/linuxthreads/sysdeps/s390/tls.h
  415. +++ /dev/null
  416. @@ -1,144 +0,0 @@
  417. -/* Definitions for thread-local data handling. linuxthreads/s390 version.
  418. - Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
  419. - This file is part of the GNU C Library.
  420. -
  421. - The GNU C Library is free software; you can redistribute it and/or
  422. - modify it under the terms of the GNU Lesser General Public
  423. - License as published by the Free Software Foundation; either
  424. - version 2.1 of the License, or (at your option) any later version.
  425. -
  426. - The GNU C Library is distributed in the hope that it will be useful,
  427. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  428. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  429. - Lesser General Public License for more details.
  430. -
  431. - You should have received a copy of the GNU Lesser General Public
  432. - License along with the GNU C Library; if not, see
  433. - <http://www.gnu.org/licenses/>. */
  434. -
  435. -#ifndef _TLS_H
  436. -#define _TLS_H
  437. -
  438. -#ifndef __ASSEMBLER__
  439. -
  440. -# include <pt-machine.h>
  441. -# include <stdbool.h>
  442. -# include <stddef.h>
  443. -
  444. -/* Type for the dtv. */
  445. -typedef union dtv
  446. -{
  447. - size_t counter;
  448. - struct
  449. - {
  450. - void *val;
  451. - bool is_static;
  452. - } pointer;
  453. -} dtv_t;
  454. -
  455. -typedef struct
  456. -{
  457. - void *tcb; /* Pointer to the TCB. Not necessary the
  458. - thread descriptor used by libpthread. */
  459. - dtv_t *dtv;
  460. - void *self; /* Pointer to the thread descriptor. */
  461. - int multiple_threads;
  462. -} tcbhead_t;
  463. -
  464. -#else /* __ASSEMBLER__ */
  465. -# include <tcb-offsets.h>
  466. -#endif /* __ASSEMBLER__ */
  467. -
  468. -/* TLS is always supported if the tools support it. There are no
  469. - kernel dependencies. To avoid bothering with the TLS support code
  470. - at all, use configure --without-tls.
  471. -
  472. - We need USE_TLS to be consistently defined, for ldsodefs.h
  473. - conditionals. */
  474. -
  475. -#ifdef HAVE_TLS_SUPPORT
  476. -
  477. -/* Signal that TLS support is available. */
  478. -# define USE_TLS 1
  479. -
  480. -# ifndef __ASSEMBLER__
  481. -/* Get system call information. */
  482. -# include <sysdep.h>
  483. -
  484. -
  485. -/* Get the thread descriptor definition. */
  486. -# include <linuxthreads/descr.h>
  487. -
  488. -/* This is the size of the initial TCB. */
  489. -# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
  490. -
  491. -/* Alignment requirements for the initial TCB. */
  492. -# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t)
  493. -
  494. -/* This is the size of the TCB. */
  495. -# define TLS_TCB_SIZE sizeof (struct _pthread_descr_struct)
  496. -
  497. -/* Alignment requirements for the TCB. */
  498. -# define TLS_TCB_ALIGN __alignof__ (struct _pthread_descr_struct)
  499. -
  500. -/* The TCB can have any size and the memory following the address the
  501. - thread pointer points to is unspecified. Allocate the TCB there. */
  502. -# define TLS_TCB_AT_TP 1
  503. -
  504. -
  505. -/* Install the dtv pointer. The pointer passed is to the element with
  506. - index -1 which contain the length. */
  507. -# define INSTALL_DTV(descr, dtvp) \
  508. - ((tcbhead_t *) (descr))->dtv = (dtvp) + 1
  509. -
  510. -/* Install new dtv for current thread. */
  511. -# define INSTALL_NEW_DTV(dtv) \
  512. - (((tcbhead_t *) __builtin_thread_pointer ())->dtv = (dtv))
  513. -
  514. -/* Return dtv of given thread descriptor. */
  515. -# define GET_DTV(descr) \
  516. - (((tcbhead_t *) (descr))->dtv)
  517. -
  518. -/* Code to initially initialize the thread pointer. This might need
  519. - special attention since 'errno' is not yet available and if the
  520. - operation can cause a failure 'errno' must not be touched.
  521. -
  522. - The value of this macro is null if successful, or an error string. */
  523. -# define TLS_INIT_TP(descr, secondcall) \
  524. - ({ \
  525. - void *_descr = (descr); \
  526. - tcbhead_t *head = _descr; \
  527. - \
  528. - head->tcb = _descr; \
  529. - /* For now the thread descriptor is at the same address. */ \
  530. - head->self = _descr; \
  531. - \
  532. - __builtin_set_thread_pointer (_descr); \
  533. - NULL; \
  534. - })
  535. -
  536. -/* Return the address of the dtv for the current thread. */
  537. -# define THREAD_DTV() \
  538. - (((tcbhead_t *) __builtin_thread_pointer ())->dtv)
  539. -
  540. -# endif /* __ASSEMBLER__ */
  541. -
  542. -#else /* HAVE_TLS_SUPPORT && (FLOATING_STACKS || !IS_IN_libpthread) */
  543. -
  544. -# ifndef __ASSEMBLER__
  545. -
  546. -/* Get the thread descriptor definition. */
  547. -# include <linuxthreads/descr.h>
  548. -
  549. -# define NONTLS_INIT_TP \
  550. - do { \
  551. - static const tcbhead_t nontls_init_tp \
  552. - = { .multiple_threads = 0 }; \
  553. - INIT_THREAD_SELF (&nontls_init_tp, 0); \
  554. - } while (0)
  555. -
  556. -# endif /* __ASSEMBLER__ */
  557. -
  558. -#endif /* HAVE_TLS_SUPPORT && (FLOATING_STACKS || !IS_IN_libpthread) */
  559. -
  560. -#endif /* tls.h */
  561. diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/bits/typesizes.h b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/bits/typesizes.h
  562. deleted file mode 100644
  563. index 6b58825..0000000
  564. --- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/bits/typesizes.h
  565. +++ /dev/null
  566. @@ -1,71 +0,0 @@
  567. -/* bits/typesizes.h -- underlying types for *_t. Linux/s390 version.
  568. - Copyright (C) 2003 Free Software Foundation, Inc.
  569. - This file is part of the GNU C Library.
  570. -
  571. - The GNU C Library is free software; you can redistribute it and/or
  572. - modify it under the terms of the GNU Lesser General Public
  573. - License as published by the Free Software Foundation; either
  574. - version 2.1 of the License, or (at your option) any later version.
  575. -
  576. - The GNU C Library is distributed in the hope that it will be useful,
  577. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  578. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  579. - Lesser General Public License for more details.
  580. -
  581. - You should have received a copy of the GNU Lesser General Public
  582. - License along with the GNU C Library; if not, see
  583. - <http://www.gnu.org/licenses/>. */
  584. -
  585. -#ifndef _BITS_TYPES_H
  586. -# error "Never include <bits/typesizes.h> directly; use <sys/types.h> instead."
  587. -#endif
  588. -
  589. -#ifndef _BITS_TYPESIZES_H
  590. -#define _BITS_TYPESIZES_H 1
  591. -
  592. -/* See <bits/types.h> for the meaning of these macros. This file exists so
  593. - that <bits/types.h> need not vary across different GNU platforms. */
  594. -
  595. -#define __DEV_T_TYPE __UQUAD_TYPE
  596. -#define __UID_T_TYPE __U32_TYPE
  597. -#define __GID_T_TYPE __U32_TYPE
  598. -#define __INO_T_TYPE __ULONGWORD_TYPE
  599. -#define __INO64_T_TYPE __UQUAD_TYPE
  600. -#define __MODE_T_TYPE __U32_TYPE
  601. -#define __NLINK_T_TYPE __UWORD_TYPE
  602. -#define __OFF_T_TYPE __SLONGWORD_TYPE
  603. -#define __OFF64_T_TYPE __SQUAD_TYPE
  604. -#define __PID_T_TYPE __S32_TYPE
  605. -#define __RLIM_T_TYPE __ULONGWORD_TYPE
  606. -#define __RLIM64_T_TYPE __UQUAD_TYPE
  607. -#define __BLKCNT_T_TYPE __SLONGWORD_TYPE
  608. -#define __BLKCNT64_T_TYPE __SQUAD_TYPE
  609. -#define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
  610. -#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
  611. -#define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
  612. -#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
  613. -#define __ID_T_TYPE __U32_TYPE
  614. -#define __CLOCK_T_TYPE __SLONGWORD_TYPE
  615. -#define __TIME_T_TYPE __SLONGWORD_TYPE
  616. -#define __USECONDS_T_TYPE __U32_TYPE
  617. -#define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
  618. -#define __DADDR_T_TYPE __S32_TYPE
  619. -#define __SWBLK_T_TYPE __SLONGWORD_TYPE
  620. -#define __KEY_T_TYPE __S32_TYPE
  621. -#define __CLOCKID_T_TYPE __S32_TYPE
  622. -#define __TIMER_T_TYPE __S32_TYPE
  623. -#define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
  624. -#define __FSID_T_TYPE struct { int __val[2]; }
  625. -#if defined __GNUC__ && __GNUC__ <= 2
  626. -/* Compatibility with g++ 2.95.x. */
  627. -#define __SSIZE_T_TYPE __SWORD_TYPE
  628. -#else
  629. -/* size_t is unsigned long int on s390 -m31. */
  630. -#define __SSIZE_T_TYPE __SLONGWORD_TYPE
  631. -#endif
  632. -
  633. -/* Number of descriptors that can fit in an `fd_set'. */
  634. -#define __FD_SETSIZE 1024
  635. -
  636. -
  637. -#endif /* bits/typesizes.h */
  638. diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c
  639. deleted file mode 100644
  640. index cde4183..0000000
  641. --- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c
  642. +++ /dev/null
  643. @@ -1,153 +0,0 @@
  644. -/* Special .init and .fini section support for S/390.
  645. - Copyright (C) 2000, 2001 Free Software Foundation, Inc.
  646. - This file is part of the GNU C Library.
  647. -
  648. - The GNU C Library is free software; you can redistribute it
  649. - and/or modify it under the terms of the GNU Lesser General Public
  650. - License as published by the Free Software Foundation; either
  651. - version 2.1 of the License, or (at your option) any later version.
  652. -
  653. - In addition to the permissions in the GNU Lesser General Public
  654. - License, the Free Software Foundation gives you unlimited
  655. - permission to link the compiled version of this file with other
  656. - programs, and to distribute those programs without any restriction
  657. - coming from the use of this file. (The Lesser General Public
  658. - License restrictions do apply in other respects; for example, they
  659. - cover modification of the file, and distribution when not linked
  660. - into another program.)
  661. -
  662. - The GNU C Library is distributed in the hope that it will be
  663. - useful, but WITHOUT ANY WARRANTY; without even the implied warranty
  664. - of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  665. - GNU Lesser General Public License for more details.
  666. -
  667. - You should have received a copy of the GNU Lesser General Public
  668. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  669. - see <http://www.gnu.org/licenses/>. */
  670. -
  671. -/* This file is compiled into assembly code which is then munged by a sed
  672. - script into two files: crti.s and crtn.s.
  673. -
  674. - * crti.s puts a function prologue at the beginning of the
  675. - .init and .fini sections and defines global symbols for
  676. - those addresses, so they can be called as functions.
  677. -
  678. - * crtn.s puts the corresponding function epilogues
  679. - in the .init and .fini sections. */
  680. -
  681. -__asm__ ("\
  682. -\n\
  683. -#include \"defs.h\"\n\
  684. -\n\
  685. -/*@HEADER_ENDS*/\n\
  686. -\n\
  687. -/*@TESTS_BEGIN*/\n\
  688. -\n\
  689. -/*@TESTS_END*/\n\
  690. -\n\
  691. -/*@_init_PROLOG_BEGINS*/\n\
  692. -\n\
  693. - .section .init\n\
  694. -#NO_APP\n\
  695. - .align 4\n\
  696. -.globl _init\n\
  697. - .type _init,@function\n\
  698. -_init:\n\
  699. -# leaf function 0\n\
  700. -# automatics 0\n\
  701. -# outgoing args 0\n\
  702. -# need frame pointer 0\n\
  703. -# call alloca 0\n\
  704. -# has varargs 0\n\
  705. -# incoming args (stack) 0\n\
  706. -# function length 36\n\
  707. - STM 6,15,24(15)\n\
  708. - BRAS 13,.LTN1_0\n\
  709. -.LT1_0:\n\
  710. -.LC13:\n\
  711. - .long __pthread_initialize_minimal@PLT-.LT1_0\n\
  712. -.LC14:\n\
  713. - .long __gmon_start__@GOT\n\
  714. -.LC15:\n\
  715. - .long _GLOBAL_OFFSET_TABLE_-.LT1_0\n\
  716. -.LTN1_0:\n\
  717. - LR 1,15\n\
  718. - AHI 15,-96\n\
  719. - ST 1,0(15)\n\
  720. - L 12,.LC15-.LT1_0(13)\n\
  721. - AR 12,13\n\
  722. - L 1,.LC13-.LT1_0(13)\n\
  723. - LA 1,0(1,13)\n\
  724. - BASR 14,1\n\
  725. - L 1,.LC14-.LT1_0(13)\n\
  726. - L 1,0(1,12)\n\
  727. - LTR 1,1\n\
  728. - JE .L22\n\
  729. - BASR 14,1\n\
  730. -.L22:\n\
  731. -#APP\n\
  732. - .align 4,0x07\n\
  733. - END_INIT\n\
  734. -\n\
  735. -/*@_init_PROLOG_ENDS*/\n\
  736. -\n\
  737. -/*@_init_EPILOG_BEGINS*/\n\
  738. - .align 4\n\
  739. - .section .init\n\
  740. -#NO_APP\n\
  741. - .align 4\n\
  742. - L 4,152(15)\n\
  743. - LM 6,15,120(15)\n\
  744. - BR 4\n\
  745. -#APP\n\
  746. - END_INIT\n\
  747. -\n\
  748. -/*@_init_EPILOG_ENDS*/\n\
  749. -\n\
  750. -/*@_fini_PROLOG_BEGINS*/\n\
  751. - .section .fini\n\
  752. -#NO_APP\n\
  753. - .align 4\n\
  754. -.globl _fini\n\
  755. - .type _fini,@function\n\
  756. -_fini:\n\
  757. -# leaf function 0\n\
  758. -# automatics 0\n\
  759. -# outgoing args 0\n\
  760. -# need frame pointer 0\n\
  761. -# call alloca 0\n\
  762. -# has varargs 0\n\
  763. -# incoming args (stack) 0\n\
  764. -# function length 30\n\
  765. - STM 6,15,24(15)\n\
  766. - BRAS 13,.LTN2_0\n\
  767. -.LT2_0:\n\
  768. -.LC17:\n\
  769. - .long _GLOBAL_OFFSET_TABLE_-.LT2_0\n\
  770. -.LTN2_0:\n\
  771. - LR 1,15\n\
  772. - AHI 15,-96\n\
  773. - ST 1,0(15)\n\
  774. - L 12,.LC17-.LT2_0(13)\n\
  775. - AR 12,13\n\
  776. -#APP\n\
  777. - .align 4,0x07\n\
  778. - END_FINI\n\
  779. -\n\
  780. -/*@_fini_PROLOG_ENDS*/\n\
  781. -\n\
  782. -/*@_fini_EPILOG_BEGINS*/\n\
  783. - .align 4\n\
  784. - .section .fini\n\
  785. -#NO_APP\n\
  786. - .align 4\n\
  787. - L 4,152(15)\n\
  788. - LM 6,15,120(15)\n\
  789. - BR 4\n\
  790. -#APP\n\
  791. - END_FINI\n\
  792. -\n\
  793. -/*@_fini_EPILOG_ENDS*/\n\
  794. -\n\
  795. -/*@TRAILER_BEGINS*/\
  796. -");
  797. diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
  798. deleted file mode 100644
  799. index 2431129..0000000
  800. --- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
  801. +++ /dev/null
  802. @@ -1,136 +0,0 @@
  803. -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
  804. - This file is part of the GNU C Library.
  805. - Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
  806. -
  807. - The GNU C Library is free software; you can redistribute it and/or
  808. - modify it under the terms of the GNU Lesser General Public
  809. - License as published by the Free Software Foundation; either
  810. - version 2.1 of the License, or (at your option) any later version.
  811. -
  812. - The GNU C Library is distributed in the hope that it will be useful,
  813. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  814. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  815. - Lesser General Public License for more details.
  816. -
  817. - You should have received a copy of the GNU Lesser General Public
  818. - License along with the GNU C Library; if not, see
  819. - <http://www.gnu.org/licenses/>. */
  820. -
  821. -#include <sysdep.h>
  822. -#include <tls.h>
  823. -#ifndef __ASSEMBLER__
  824. -# include <linuxthreads/internals.h>
  825. -#endif
  826. -
  827. -#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
  828. -
  829. -# if !defined NOT_IN_libc || defined IS_IN_libpthread
  830. -
  831. -# define PSEUDO_CANCEL(name, syscall_name, args) \
  832. -L(pseudo_cancel): \
  833. - STM_##args \
  834. - stm %r12,%r15,48(%r15); \
  835. - lr %r14,%r15; \
  836. - ahi %r15,-96; \
  837. - st %r14,0(%r15); \
  838. - basr %r13,0; \
  839. -0: l %r1,1f-0b(%r13); \
  840. - bas %r14,0(%r1,%r13); \
  841. - lr %r0,%r2; \
  842. - LM_##args \
  843. - DO_CALL(syscall_name, args); \
  844. - l %r1,2f-0b(%r13); \
  845. - lr %r12,%r2; \
  846. - lr %r2,%r0; \
  847. - bas %r14,0(%r1,%r13); \
  848. - lr %r2,%r12; \
  849. - lm %r12,%r15,48+96(%r15); \
  850. - j L(pseudo_check); \
  851. -1: .long CENABLE-0b; \
  852. -2: .long CDISABLE-0b;
  853. -
  854. -# else /* !libc.so && !libpthread.so */
  855. -
  856. -# define PSEUDO_CANCEL(name, syscall_name, args) \
  857. -L(pseudo_cancel): \
  858. - STM_##args \
  859. - stm %r11,%r15,44(%r15); \
  860. - lr %r14,%r15; \
  861. - ahi %r15,-96; \
  862. - st %r14,0(%r15); \
  863. - basr %r13,0; \
  864. -0: l %r12,3f-0b(%r13); \
  865. - l %r1,1f-0b(%r13); \
  866. - la %r12,0(%r12,%r13); \
  867. - bas %r14,0(%r1,%r13); \
  868. - lr %r0,%r2; \
  869. - LM_##args \
  870. - DO_CALL(syscall_name, args); \
  871. - l %r1,2f-0b(%r13); \
  872. - lr %r11,%r2; \
  873. - lr %r2,%r0; \
  874. - bas %r14,0(%r1,%r13); \
  875. - lr %r2,%r11; \
  876. - lm %r11,%r15,44+96(%r15); \
  877. - j L(pseudo_check); \
  878. -1: .long CENABLE@PLT-0b; \
  879. -2: .long CDISABLE@PLT-0b; \
  880. -3: .long _GLOBAL_OFFSET_TABLE_-0b;
  881. -
  882. -# endif
  883. -
  884. -# undef PSEUDO
  885. -# define PSEUDO(name, syscall_name, args) \
  886. - .text; \
  887. -PSEUDO_CANCEL(name, syscall_name, args) \
  888. -ENTRY(name) \
  889. - SINGLE_THREAD_P(%r1) \
  890. - jne L(pseudo_cancel); \
  891. - DO_CALL(syscall_name, args); \
  892. -L(pseudo_check): \
  893. - lhi %r4,-4095; \
  894. - clr %r2,%r4; \
  895. - jnl SYSCALL_ERROR_LABEL; \
  896. -L(pseudo_end):
  897. -
  898. -# ifdef IS_IN_libpthread
  899. -# define CENABLE __pthread_enable_asynccancel
  900. -# define CDISABLE __pthread_disable_asynccancel
  901. -# elif !defined NOT_IN_libc
  902. -# define CENABLE __libc_enable_asynccancel
  903. -# define CDISABLE __libc_disable_asynccancel
  904. -# else
  905. -# define CENABLE __librt_enable_asynccancel
  906. -# define CDISABLE __librt_disable_asynccancel
  907. -# endif
  908. -
  909. -#define STM_0 /* Nothing */
  910. -#define STM_1 st %r2,8(%r15);
  911. -#define STM_2 stm %r2,%r3,8(%r15);
  912. -#define STM_3 stm %r2,%r4,8(%r15);
  913. -#define STM_4 stm %r2,%r5,8(%r15);
  914. -#define STM_5 stm %r2,%r5,8(%r15);
  915. -
  916. -#define LM_0 /* Nothing */
  917. -#define LM_1 l %r2,8+96(%r15);
  918. -#define LM_2 lm %r2,%r3,8+96(%r15);
  919. -#define LM_3 lm %r2,%r4,8+96(%r15);
  920. -#define LM_4 lm %r2,%r5,8+96(%r15);
  921. -#define LM_5 lm %r2,%r5,8+96(%r15);
  922. -
  923. -# ifndef __ASSEMBLER__
  924. -# define SINGLE_THREAD_P \
  925. - __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
  926. - p_header.data.multiple_threads) == 0, 1)
  927. -# else
  928. -# define SINGLE_THREAD_P(reg) \
  929. - ear reg,%a0; \
  930. - icm reg,15,MULTIPLE_THREADS_OFFSET(reg);
  931. -# endif
  932. -
  933. -#elif !defined __ASSEMBLER__
  934. -
  935. -/* This code should never be used but we define it anyhow. */
  936. -# define SINGLE_THREAD_P (1)
  937. -
  938. -#endif
  939. diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S
  940. deleted file mode 100644
  941. index 078c730..0000000
  942. --- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-32/vfork.S
  943. +++ /dev/null
  944. @@ -1,68 +0,0 @@
  945. -/* Copyright (C) 2003 Free Software Foundation, Inc.
  946. - This file is part of the GNU C Library.
  947. - Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>
  948. -
  949. - The GNU C Library is free software; you can redistribute it and/or
  950. - modify it under the terms of the GNU Lesser General Public
  951. - License as published by the Free Software Foundation; either
  952. - version 2.1 of the License, or (at your option) any later version.
  953. -
  954. - The GNU C Library is distributed in the hope that it will be useful,
  955. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  956. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  957. - Lesser General Public License for more details.
  958. -
  959. - You should have received a copy of the GNU Lesser General Public
  960. - License along with the GNU C Library; if not, see
  961. - <http://www.gnu.org/licenses/>. */
  962. -
  963. -#include <sysdep-cancel.h>
  964. -#define _ERRNO_H 1
  965. -#include <bits/errno.h>
  966. -
  967. -/* Clone the calling process, but without copying the whole address space.
  968. - The calling process is suspended until the new process exits or is
  969. - replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
  970. - and the process ID of the new process to the old process. */
  971. -
  972. -ENTRY (__vfork)
  973. - basr %r1,0
  974. -0:
  975. -#ifdef SHARED
  976. - al %r1,4f-0b(%r1)
  977. - l %r1,0(%r1)
  978. - ltr %r1,%r1
  979. -#else
  980. - icm %r1,15,4f-0b(%r1)
  981. -#endif
  982. - jne 1f
  983. -
  984. - /* Do vfork system call. */
  985. - svc SYS_ify (vfork)
  986. -
  987. - /* Check for error. */
  988. - lhi %r4,-4095
  989. - clr %r2,%r4
  990. - jnl SYSCALL_ERROR_LABEL
  991. -
  992. - /* Normal return. */
  993. - br %r14
  994. -1:
  995. - basr %r1,0
  996. -2:
  997. - al %r1,3f-2b(%r1)
  998. - br %r1
  999. -3:
  1000. - .long HIDDEN_JUMPTARGET(fork)-2b
  1001. -4:
  1002. -#ifdef SHARED
  1003. - .long __libc_pthread_functions-0b
  1004. -#else
  1005. - .weak pthread_create
  1006. - .long pthread_create
  1007. -#endif
  1008. -PSEUDO_END(__vfork)
  1009. -
  1010. -libc_hidden_def (__vfork)
  1011. -
  1012. -weak_alias (__vfork, vfork)
  1013. diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c
  1014. deleted file mode 100644
  1015. index 136ce54..0000000
  1016. --- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c
  1017. +++ /dev/null
  1018. @@ -1,136 +0,0 @@
  1019. -/* Special .init and .fini section support for 64 bit S/390.
  1020. - Copyright (C) 2001 Free Software Foundation, Inc.
  1021. - Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
  1022. - This file is part of the GNU C Library.
  1023. -
  1024. - The GNU C Library is free software; you can redistribute it
  1025. - and/or modify it under the terms of the GNU Lesser General Public
  1026. - License as published by the Free Software Foundation; either
  1027. - version 2.1 of the License, or (at your option) any later version.
  1028. -
  1029. - In addition to the permissions in the GNU Lesser General Public
  1030. - License, the Free Software Foundation gives you unlimited
  1031. - permission to link the compiled version of this file with other
  1032. - programs, and to distribute those programs without any restriction
  1033. - coming from the use of this file. (The Lesser General Public
  1034. - License restrictions do apply in other respects; for example, they
  1035. - cover modification of the file, and distribution when not linked
  1036. - into another program.)
  1037. -
  1038. - The GNU C Library is distributed in the hope that it will be
  1039. - useful, but WITHOUT ANY WARRANTY; without even the implied warranty
  1040. - of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1041. - GNU Lesser General Public License for more details.
  1042. -
  1043. - You should have received a copy of the GNU Lesser General Public
  1044. - License along with the GNU C Library; see the file COPYING.LIB. If not,
  1045. - see <http://www.gnu.org/licenses/>. */
  1046. -
  1047. -/* This file is compiled into assembly code which is then munged by a sed
  1048. - script into two files: crti.s and crtn.s.
  1049. -
  1050. - * crti.s puts a function prologue at the beginning of the
  1051. - .init and .fini sections and defines global symbols for
  1052. - those addresses, so they can be called as functions.
  1053. -
  1054. - * crtn.s puts the corresponding function epilogues
  1055. - in the .init and .fini sections. */
  1056. -
  1057. -__asm__ ("\
  1058. -\n\
  1059. -#include \"defs.h\"\n\
  1060. -\n\
  1061. -/*@HEADER_ENDS*/\n\
  1062. -\n\
  1063. -/*@TESTS_BEGIN*/\n\
  1064. -\n\
  1065. -/*@TESTS_END*/\n\
  1066. -\n\
  1067. -/*@_init_PROLOG_BEGINS*/\n\
  1068. -\n\
  1069. - .section .init\n\
  1070. -#NO_APP\n\
  1071. - .align 4\n\
  1072. -.globl _init\n\
  1073. - .type _init,@function\n\
  1074. -_init:\n\
  1075. -# leaf function 0\n\
  1076. -# automatics 0\n\
  1077. -# outgoing args 0\n\
  1078. -# need frame pointer 0\n\
  1079. -# call alloca 0\n\
  1080. -# has varargs 0\n\
  1081. -# incoming args (stack) 0\n\
  1082. -# function length 36\n\
  1083. - STMG 6,15,48(15)\n\
  1084. - LGR 1,15\n\
  1085. - AGHI 15,-160\n\
  1086. - STG 1,0(15)\n\
  1087. - LARL 12,_GLOBAL_OFFSET_TABLE_\n\
  1088. - BRASL 14,__pthread_initialize_minimal@PLT\n\
  1089. - LARL 1,__gmon_start__@GOTENT\n\
  1090. - LG 1,0(1)\n\
  1091. - LTGR 1,1\n\
  1092. - JE .L22\n\
  1093. - BASR 14,1\n\
  1094. -.L22:\n\
  1095. -#APP\n\
  1096. - .align 4,0x07\n\
  1097. - END_INIT\n\
  1098. -\n\
  1099. -/*@_init_PROLOG_ENDS*/\n\
  1100. -\n\
  1101. -/*@_init_EPILOG_BEGINS*/\n\
  1102. - .align 4\n\
  1103. - .section .init\n\
  1104. -#NO_APP\n\
  1105. - .align 4\n\
  1106. - LG 4,272(15)\n\
  1107. - LMG 6,15,208(15)\n\
  1108. - BR 4\n\
  1109. -#APP\n\
  1110. - END_INIT\n\
  1111. -\n\
  1112. -/*@_init_EPILOG_ENDS*/\n\
  1113. -\n\
  1114. -/*@_fini_PROLOG_BEGINS*/\n\
  1115. - .section .fini\n\
  1116. -#NO_APP\n\
  1117. - .align 4\n\
  1118. -.globl _fini\n\
  1119. - .type _fini,@function\n\
  1120. -_fini:\n\
  1121. -# leaf function 0\n\
  1122. -# automatics 0\n\
  1123. -# outgoing args 0\n\
  1124. -# need frame pointer 0\n\
  1125. -# call alloca 0\n\
  1126. -# has varargs 0\n\
  1127. -# incoming args (stack) 0\n\
  1128. -# function length 30\n\
  1129. - STMG 6,15,48(15)\n\
  1130. - LGR 1,15\n\
  1131. - AGHI 15,-160\n\
  1132. - STG 1,0(15)\n\
  1133. - LARL 12,_GLOBAL_OFFSET_TABLE_\n\
  1134. -#APP\n\
  1135. - .align 4,0x07\n\
  1136. - END_FINI\n\
  1137. -\n\
  1138. -/*@_fini_PROLOG_ENDS*/\n\
  1139. -\n\
  1140. -/*@_fini_EPILOG_BEGINS*/\n\
  1141. - .align 4\n\
  1142. - .section .fini\n\
  1143. -#NO_APP\n\
  1144. - .align 4\n\
  1145. - LG 4,272(15)\n\
  1146. - LMG 6,15,208(15)\n\
  1147. - BR 4\n\
  1148. -#APP\n\
  1149. - END_FINI\n\
  1150. -\n\
  1151. -/*@_fini_EPILOG_ENDS*/\n\
  1152. -\n\
  1153. -/*@TRAILER_BEGINS*/\n\
  1154. - ");
  1155. diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c
  1156. deleted file mode 100644
  1157. index d57283a..0000000
  1158. --- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/pt-sigsuspend.c
  1159. +++ /dev/null
  1160. @@ -1 +0,0 @@
  1161. -#include "../../ia64/pt-sigsuspend.c"
  1162. diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
  1163. deleted file mode 100644
  1164. index cf3124e..0000000
  1165. --- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
  1166. +++ /dev/null
  1167. @@ -1,115 +0,0 @@
  1168. -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc.
  1169. - This file is part of the GNU C Library.
  1170. - Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
  1171. -
  1172. - The GNU C Library is free software; you can redistribute it and/or
  1173. - modify it under the terms of the GNU Lesser General Public
  1174. - License as published by the Free Software Foundation; either
  1175. - version 2.1 of the License, or (at your option) any later version.
  1176. -
  1177. - The GNU C Library is distributed in the hope that it will be useful,
  1178. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  1179. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1180. - Lesser General Public License for more details.
  1181. -
  1182. - You should have received a copy of the GNU Lesser General Public
  1183. - License along with the GNU C Library; if not, see
  1184. - <http://www.gnu.org/licenses/>. */
  1185. -
  1186. -#include <sysdep.h>
  1187. -#include <tls.h>
  1188. -#ifndef __ASSEMBLER__
  1189. -# include <linuxthreads/internals.h>
  1190. -#endif
  1191. -
  1192. -#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
  1193. -
  1194. -# undef PSEUDO
  1195. -# define PSEUDO(name, syscall_name, args) \
  1196. - .text; \
  1197. -L(pseudo_cancel): \
  1198. - STM_##args \
  1199. - stmg %r13,%r15,104(%r15); \
  1200. - lgr %r14,%r15; \
  1201. - aghi %r15,-160; \
  1202. - stg %r14,0(%r15); \
  1203. - brasl %r14,CENABLE; \
  1204. - lgr %r0,%r2; \
  1205. - LM_##args \
  1206. - DO_CALL(syscall_name, args); \
  1207. - lgr %r13,%r2; \
  1208. - lgr %r2,%r0; \
  1209. - brasl %r14,CDISABLE; \
  1210. - lgr %r2,%r13; \
  1211. - lmg %r13,%r15,104+160(%r15); \
  1212. - j L(pseudo_check); \
  1213. -ENTRY(name) \
  1214. - SINGLE_THREAD_P \
  1215. - jne L(pseudo_cancel); \
  1216. - DO_CALL(syscall_name, args); \
  1217. -L(pseudo_check): \
  1218. - lghi %r4,-4095; \
  1219. - clgr %r2,%r4; \
  1220. - jgnl SYSCALL_ERROR_LABEL; \
  1221. -L(pseudo_end):
  1222. -
  1223. -# ifdef IS_IN_libpthread
  1224. -# define CENABLE __pthread_enable_asynccancel
  1225. -# define CDISABLE __pthread_disable_asynccancel
  1226. -# define __local_multiple_threads __pthread_multiple_threads
  1227. -# elif !defined NOT_IN_libc
  1228. -# define CENABLE __libc_enable_asynccancel
  1229. -# define CDISABLE __libc_disable_asynccancel
  1230. -# define __local_multiple_threads __libc_multiple_threads
  1231. -# else
  1232. -# define CENABLE __librt_enable_asynccancel@PLT
  1233. -# define CDISABLE __librt_disable_asynccancel@PLT
  1234. -# endif
  1235. -
  1236. -#define STM_0 /* Nothing */
  1237. -#define STM_1 stg %r2,16(%r15);
  1238. -#define STM_2 stmg %r2,%r3,16(%r15);
  1239. -#define STM_3 stmg %r2,%r4,16(%r15);
  1240. -#define STM_4 stmg %r2,%r5,16(%r15);
  1241. -#define STM_5 stmg %r2,%r5,16(%r15);
  1242. -
  1243. -#define LM_0 /* Nothing */
  1244. -#define LM_1 lg %r2,16+160(%r15);
  1245. -#define LM_2 lmg %r2,%r3,16+160(%r15);
  1246. -#define LM_3 lmg %r2,%r4,16+160(%r15);
  1247. -#define LM_4 lmg %r2,%r5,16+160(%r15);
  1248. -#define LM_5 lmg %r2,%r5,16+160(%r15);
  1249. -
  1250. -# if !defined NOT_IN_libc || defined IS_IN_libpthread
  1251. -# ifndef __ASSEMBLER__
  1252. -extern int __local_multiple_threads attribute_hidden;
  1253. -# define SINGLE_THREAD_P \
  1254. - __builtin_expect (__local_multiple_threads == 0, 1)
  1255. -# else
  1256. -# define SINGLE_THREAD_P \
  1257. - larl %r1,__local_multiple_threads; \
  1258. - icm %r0,15,0(%r1);
  1259. -# endif
  1260. -
  1261. -# else
  1262. -
  1263. -# ifndef __ASSEMBLER__
  1264. -# define SINGLE_THREAD_P \
  1265. - __builtin_expect (THREAD_GETMEM (THREAD_SELF, \
  1266. - p_header.data.multiple_threads) == 0, 1)
  1267. -# else
  1268. -# define SINGLE_THREAD_P \
  1269. - ear %r1,%a0; \
  1270. - sllg %r1,%r1,32; \
  1271. - ear %r1,%a1; \
  1272. - icm %r1,15,MULTIPLE_THREADS_OFFSET(%r1);
  1273. -# endif
  1274. -
  1275. -# endif
  1276. -
  1277. -#elif !defined __ASSEMBLER__
  1278. -
  1279. -/* This code should never be used but we define it anyhow. */
  1280. -# define SINGLE_THREAD_P (1)
  1281. -
  1282. -#endif
  1283. diff --git a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S b/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S
  1284. deleted file mode 100644
  1285. index 109d4f6..0000000
  1286. --- a/libpthread/linuxthreads/sysdeps/unix/sysv/linux/s390/s390-64/vfork.S
  1287. +++ /dev/null
  1288. @@ -1,53 +0,0 @@
  1289. -/* Copyright (C) 2003 Free Software Foundation, Inc.
  1290. - This file is part of the GNU C Library.
  1291. - Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>
  1292. -
  1293. - The GNU C Library is free software; you can redistribute it and/or
  1294. - modify it under the terms of the GNU Lesser General Public
  1295. - License as published by the Free Software Foundation; either
  1296. - version 2.1 of the License, or (at your option) any later version.
  1297. -
  1298. - The GNU C Library is distributed in the hope that it will be useful,
  1299. - but WITHOUT ANY WARRANTY; without even the implied warranty of
  1300. - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1301. - Lesser General Public License for more details.
  1302. -
  1303. - You should have received a copy of the GNU Lesser General Public
  1304. - License along with the GNU C Library; if not, see
  1305. - <http://www.gnu.org/licenses/>. */
  1306. -
  1307. -#include <sysdep-cancel.h>
  1308. -#define _ERRNO_H 1
  1309. -#include <bits/errno.h>
  1310. -
  1311. -/* Clone the calling process, but without copying the whole address space.
  1312. - The calling process is suspended until the new process exits or is
  1313. - replaced by a call to `execve'. Return -1 for errors, 0 to the new process,
  1314. - and the process ID of the new process to the old process. */
  1315. -
  1316. -ENTRY (__vfork)
  1317. -#ifdef SHARED
  1318. - larl %r1,__libc_pthread_functions
  1319. - lg %r1,0(%r1)
  1320. -#else
  1321. - .weak pthread_create
  1322. - larl %r1,pthread_create
  1323. -#endif
  1324. - ltgr %r1,%r1
  1325. - jgne HIDDEN_JUMPTARGET(fork)
  1326. -
  1327. - /* Do vfork system call. */
  1328. - svc SYS_ify (vfork)
  1329. -
  1330. - /* Check for error. */
  1331. - lghi %r4,-4095
  1332. - clgr %r2,%r4
  1333. - jgnl SYSCALL_ERROR_LABEL
  1334. -
  1335. - /* Normal return. */
  1336. - br %r14
  1337. -PSEUDO_END(__vfork)
  1338. -
  1339. -libc_hidden_def (__vfork)
  1340. -
  1341. -weak_alias (__vfork, vfork)
  1342. --
  1343. 1.8.5.2 (Apple Git-48)