unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob c37eb0a526100431353043e80e9857e7542e328c 65107 bytes (raw)
name: gnu/packages/patches/libpthread-0.3-3b391d-glibc-preparation.patch 	 # note: path name is non-authoritative(*)

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
 
From 4067112197e4f8f5975c8647cab355e06736177d Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Thu, 27 Mar 2014 00:21:36 +0000
Subject: [PATCH 1/6] This helps to integrate libpthread as a glibc module.

---
 configure | 2 ++
 1 file changed, 2 insertions(+)
 create mode 100644 configure

diff --git a/configure b/configure
new file mode 100644
index 0000000..2cdbc71
--- /dev/null
+++ b/configure
@@ -0,0 +1,2 @@
+libc_add_on_canonical=libpthread
+libc_add_on_subdirs=.
\ No newline at end of file
-- 
1.9.0


From 7f5f718b4a231c1e08d9ed1676cb18e265b715d6 Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Sat, 29 Mar 2014 23:29:44 +0000
Subject: [PATCH 2/6] fix

---
 signal/signal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/signal/signal.h b/signal/signal.h
index a33d995..6e22d05 100644
--- a/signal/signal.h
+++ b/signal/signal.h
@@ -26,7 +26,7 @@
 
 typedef volatile int sig_atomic_t;
 \f
-typedef uint64_t sigset_t;
+/*typedef uint64_t sigset_t;*/
 
 int sigaddset (sigset_t *, int);
 int sigdelset (sigset_t *, int);
-- 
1.9.0


From b8639799ae3b571eb44edd2b3dec109957393d3e Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Sun, 30 Mar 2014 16:56:09 +0000
Subject: [PATCH 3/6] These come from the l4 implementation and come in the way
 of the glibc Makefiles, drop them.

---
 include/libc-symbols.h      | 395 --------------------------------------------
 include/set-hooks.h         |  72 --------
 signal/README               |  12 --
 signal/TODO                 |  29 ----
 signal/kill.c               |  70 --------
 signal/pt-kill-siginfo-np.c |  88 ----------
 signal/sig-internal.c       |  26 ---
 signal/sig-internal.h       | 177 --------------------
 signal/sigaction.c          |  72 --------
 signal/sigaltstack.c        |  69 --------
 signal/signal-dispatch.c    | 117 -------------
 signal/signal.h             | 275 ------------------------------
 signal/sigpending.c         |  38 -----
 signal/sigsuspend.c         |  29 ----
 signal/sigtimedwait.c       |  30 ----
 signal/sigwaiter.c          |  91 ----------
 signal/sigwaitinfo.c        |  74 ---------
 17 files changed, 1664 deletions(-)
 delete mode 100644 include/libc-symbols.h
 delete mode 100644 include/set-hooks.h
 delete mode 100644 signal/README
 delete mode 100644 signal/TODO
 delete mode 100644 signal/kill.c
 delete mode 100644 signal/pt-kill-siginfo-np.c
 delete mode 100644 signal/sig-internal.c
 delete mode 100644 signal/sig-internal.h
 delete mode 100644 signal/sigaction.c
 delete mode 100644 signal/sigaltstack.c
 delete mode 100644 signal/signal-dispatch.c
 delete mode 100644 signal/signal.h
 delete mode 100644 signal/sigpending.c
 delete mode 100644 signal/sigsuspend.c
 delete mode 100644 signal/sigtimedwait.c
 delete mode 100644 signal/sigwaiter.c
 delete mode 100644 signal/sigwaitinfo.c

diff --git a/include/libc-symbols.h b/include/libc-symbols.h
deleted file mode 100644
index 54dd6e2..0000000
--- a/include/libc-symbols.h
+++ /dev/null
@@ -1,395 +0,0 @@
-/* Support macros for making weak and strong aliases for symbols,
-   and for using symbol sets and linker warnings with GNU ld.
-   Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2008
-     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 Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _LIBC_SYMBOLS_H
-#define _LIBC_SYMBOLS_H	1
-
-/* This file's macros are included implicitly in the compilation of every
-   file in the C library by -imacros.
-
-   We include config.h which is generated by configure.
-   It should define for us the following symbols:
-
-   * HAVE_ASM_SET_DIRECTIVE if we have `.set B, A' instead of `A = B'.
-   * ASM_GLOBAL_DIRECTIVE with `.globl' or `.global'.
-   * HAVE_GNU_LD if using GNU ld, with support for weak symbols in a.out,
-   and for symbol set and warning messages extensions in a.out and ELF.
-   * HAVE_ELF if using ELF, which supports weak symbols using `.weak'.
-   * HAVE_ASM_WEAK_DIRECTIVE if we have weak symbols using `.weak'.
-   * HAVE_ASM_WEAKEXT_DIRECTIVE if we have weak symbols using `.weakext'.
-
-   */
-
-/* This is defined for the compilation of all C library code.  features.h
-   tests this to avoid inclusion of stubs.h while compiling the library,
-   before stubs.h has been generated.  Some library code that is shared
-   with other packages also tests this symbol to see if it is being
-   compiled as part of the C library.  We must define this before including
-   config.h, because it makes some definitions conditional on whether libc
-   itself is being compiled, or just some generator program.  */
-// #define _LIBC	1
-
-/* Enable declarations of GNU extensions, since we are compiling them.  */
-#define _GNU_SOURCE	1
-/* And we also need the data for the reentrant functions.  */
-#define _REENTRANT	1
-
-// #include <config.h>
-#define HAVE_ASM_WEAK_DIRECTIVE
-#define HAVE_WEAK_SYMBOLS
-#define HAVE_ASM_SET_DIRECTIVE
-#define HAVE_BUILTIN_EXPECT
-#define HAVE_GNU_LD
-#define HAVE_ELF
-#define HAVE_SECTION_QUOTES
-#define HAVE_VISIBILITY_ATTRIBUTE
-#define HAVE_ASM_PREVIOUS_DIRECTIVE
-// #define SHARED
-
-/* The symbols in all the user (non-_) macros are C symbols.
-   HAVE_GNU_LD without HAVE_ELF implies a.out.  */
-
-#if defined HAVE_ASM_WEAK_DIRECTIVE || defined HAVE_ASM_WEAKEXT_DIRECTIVE
-# define HAVE_WEAK_SYMBOLS
-#endif
-
-#ifndef __SYMBOL_PREFIX
-# ifdef NO_UNDERSCORES
-#  define __SYMBOL_PREFIX
-# else
-#  define __SYMBOL_PREFIX "_"
-# endif
-#endif
-
-#ifndef C_SYMBOL_NAME
-# ifdef NO_UNDERSCORES
-#  define C_SYMBOL_NAME(name) name
-# else
-#  define C_SYMBOL_NAME(name) _##name
-# endif
-#endif
-
-#ifndef ASM_LINE_SEP
-# define ASM_LINE_SEP ;
-#endif
-
-#ifndef C_SYMBOL_DOT_NAME
-# define C_SYMBOL_DOT_NAME(name) .##name
-#endif
-
-#ifndef __ASSEMBLER__
-/* GCC understands weak symbols and aliases; use its interface where
-   possible, instead of embedded assembly language.  */
-
-/* Define ALIASNAME as a strong alias for NAME.  */
-# define strong_alias(name, aliasname) _strong_alias(name, aliasname)
-# define _strong_alias(name, aliasname) \
-  extern __typeof (name) aliasname __attribute__ ((alias (#name)));
-
-/* This comes between the return type and function name in
-   a function definition to make that definition weak.  */
-# define weak_function __attribute__ ((weak))
-# define weak_const_function __attribute__ ((weak, __const__))
-
-# ifdef HAVE_WEAK_SYMBOLS
-
-/* Define ALIASNAME as a weak alias for NAME.
-   If weak aliases are not available, this defines a strong alias.  */
-#  define weak_alias(name, aliasname) _weak_alias (name, aliasname)
-#  define _weak_alias(name, aliasname) \
-  extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
-
-/* Declare SYMBOL as weak undefined symbol (resolved to 0 if not defined).  */
-#  define weak_extern(symbol) _weak_extern (symbol)
-#  ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
-#   define _weak_extern(symbol) asm (".weakext " __SYMBOL_PREFIX #symbol);
-#  else
-#   define _weak_extern(symbol)    asm (".weak " __SYMBOL_PREFIX #symbol);
-#  endif
-
-# else
-
-#  define weak_alias(name, aliasname) strong_alias(name, aliasname)
-#  define weak_extern(symbol) /* Nothing. */
-
-# endif
-
-#else /* __ASSEMBLER__ */
-
-# ifdef HAVE_ASM_SET_DIRECTIVE
-#  define strong_alias(original, alias)		\
-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP	\
-  .set C_SYMBOL_NAME (alias),C_SYMBOL_NAME (original)
-# else
-#  ifdef HAVE_ASM_GLOBAL_DOT_NAME
-#   define strong_alias(original, alias)	\
-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP	\
-  C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP	\
-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP	\
-  C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
-#  else
-#   define strong_alias(original, alias)	\
-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME (alias) ASM_LINE_SEP	\
-  C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
-#  endif
-# endif
-
-# ifdef HAVE_WEAK_SYMBOLS
-#  ifdef HAVE_ASM_WEAKEXT_DIRECTIVE
-#   define weak_alias(original, alias)	\
-  .weakext C_SYMBOL_NAME (alias), C_SYMBOL_NAME (original)
-#   define weak_extern(symbol)	\
-  .weakext C_SYMBOL_NAME (symbol)
-
-#  else /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
-
-#   ifdef HAVE_ASM_GLOBAL_DOT_NAME
-#    define weak_alias(original, alias)	\
-  .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP			\
-  C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original) ASM_LINE_SEP	\
-  ASM_GLOBAL_DIRECTIVE C_SYMBOL_DOT_NAME (alias) ASM_LINE_SEP	\
-  C_SYMBOL_DOT_NAME (alias) = C_SYMBOL_DOT_NAME (original)
-#   else
-#    define weak_alias(original, alias)	\
-  .weak C_SYMBOL_NAME (alias) ASM_LINE_SEP	\
-  C_SYMBOL_NAME (alias) = C_SYMBOL_NAME (original)
-#   endif
-
-#   define weak_extern(symbol)	\
-  .weak C_SYMBOL_NAME (symbol)
-
-#  endif /* ! HAVE_ASM_WEAKEXT_DIRECTIVE */
-
-# else /* ! HAVE_WEAK_SYMBOLS */
-
-#  define weak_alias(original, alias) strong_alias(original, alias)
-#  define weak_extern(symbol) /* Nothing */
-# endif /* ! HAVE_WEAK_SYMBOLS */
-
-#endif /* __ASSEMBLER__ */
-
-/* On some platforms we can make internal function calls (i.e., calls of
-   functions not exported) a bit faster by using a different calling
-   convention.  */
-#ifndef internal_function
-# define internal_function	/* empty */
-#endif
-
-/* Prepare for the case that `__builtin_expect' is not available.  */
-#ifndef HAVE_BUILTIN_EXPECT
-# define __builtin_expect(expr, val) (expr)
-#endif
-
-/* Determine the return address.  */
-#define RETURN_ADDRESS(nr) \
-  __builtin_extract_return_addr (__builtin_return_address (nr))
-
-/* When a reference to SYMBOL is encountered, the linker will emit a
-   warning message MSG.  */
-#ifdef HAVE_GNU_LD
-# ifdef HAVE_ELF
-
-/* We want the .gnu.warning.SYMBOL section to be unallocated.  */
-#  ifdef HAVE_ASM_PREVIOUS_DIRECTIVE
-#   define __make_section_unallocated(section_string)	\
-  asm (".section " section_string "\n\t.previous");
-#  elif defined HAVE_ASM_POPSECTION_DIRECTIVE
-#   define __make_section_unallocated(section_string)	\
-  asm (".pushsection " section_string "\n\t.popsection");
-#  else
-#   define __make_section_unallocated(section_string)
-#  endif
-
-/* Tacking on "\n\t#" to the section name makes gcc put it's bogus
-   section attributes on what looks like a comment to the assembler.  */
-#  ifdef HAVE_SECTION_QUOTES
-#   define link_warning(symbol, msg) \
-  __make_section_unallocated (".gnu.warning." #symbol) \
-  static const char __evoke_link_warning_##symbol[]	\
-    __attribute__ ((unused, section (".gnu.warning." #symbol "\"\n\t#\""))) \
-    = msg;
-#  else
-#   define link_warning(symbol, msg) \
-  __make_section_unallocated (".gnu.warning." #symbol) \
-  static const char __evoke_link_warning_##symbol[]	\
-    __attribute__ ((unused, section (".gnu.warning." #symbol "\n\t#"))) = msg;
-#  endif
-# else /* Not ELF: a.out */
-#  ifdef HAVE_XCOFF
-/* XCOFF does not support .stabs.
-   The native aix linker will remove the .stab and .stabstr sections
-   The gnu linker will have a fatal error if there is a relocation for
-   symbol in the .stab section.  Silently disable this macro.  */
-#   define link_warning(symbol, msg)
-#  else
-#   define link_warning(symbol, msg)		\
-     asm (".stabs \"" msg "\",30,0,0,0\n\t"	\
-          ".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0\n");
-#  endif /* XCOFF */
-# endif
-#else
-/* We will never be heard; they will all die horribly.  */
-# define link_warning(symbol, msg)
-#endif
-
-/* A canned warning for sysdeps/stub functions.  */
-#define	stub_warning(name) \
-  link_warning (name, \
-		"warning: " #name " is not implemented and will always fail")
-
-/*
-\f
-*/
-
-#ifdef HAVE_GNU_LD
-
-/* Symbol set support macros.  */
-
-# ifdef HAVE_ELF
-
-/* Make SYMBOL, which is in the text segment, an element of SET.  */
-#  define text_set_element(set, symbol)	_elf_set_element(set, symbol)
-/* Make SYMBOL, which is in the data segment, an element of SET.  */
-#  define data_set_element(set, symbol)	_elf_set_element(set, symbol)
-/* Make SYMBOL, which is in the bss segment, an element of SET.  */
-#  define bss_set_element(set, symbol)	_elf_set_element(set, symbol)
-
-/* These are all done the same way in ELF.
-   There is a new section created for each set.  */
-#  ifdef SHARED
-/* When building a shared library, make the set section writable,
-   because it will need to be relocated at run time anyway.  */
-#   define _elf_set_element(set, symbol) \
-  static const void *__elf_set_##set##_element_##symbol##__ \
-    __attribute__ ((unused, section (#set))) = &(symbol)
-#  else
-#   define _elf_set_element(set, symbol) \
-  static const void *const __elf_set_##set##_element_##symbol##__ \
-    __attribute__ ((unused, section (#set))) = &(symbol)
-#  endif
-
-/* Define SET as a symbol set.  This may be required (it is in a.out) to
-   be able to use the set's contents.  */
-#  define symbol_set_define(set)	symbol_set_declare(set)
-
-/* Declare SET for use in this module, if defined in another module.  */
-#  define symbol_set_declare(set) \
-  extern void *const __start_##set __attribute__ ((__weak__));		\
-  extern void *const __stop_##set __attribute__ ((__weak__));		\
-  weak_extern (__start_##set) weak_extern (__stop_##set)
-
-/* Return a pointer (void *const *) to the first element of SET.  */
-#  define symbol_set_first_element(set)	(&__start_##set)
-
-/* Return true iff PTR (a void *const *) has been incremented
-   past the last element in SET.  */
-#  define symbol_set_end_p(set, ptr)	((ptr) >= &__stop_##set)
-
-# else	/* Not ELF: a.out.  */
-
-#  ifdef HAVE_XCOFF
-/* XCOFF does not support .stabs.
-   The native aix linker will remove the .stab and .stabstr sections
-   The gnu linker will have a fatal error if there is a relocation for
-   symbol in the .stab section.  Silently disable these macros.  */
-#   define text_set_element(set, symbol)
-#   define data_set_element(set, symbol)
-#   define bss_set_element(set, symbol)
-#  else
-#   define text_set_element(set, symbol)	\
-    asm (".stabs \"" __SYMBOL_PREFIX #set "\",23,0,0," __SYMBOL_PREFIX #symbol)
-#   define data_set_element(set, symbol)	\
-    asm (".stabs \"" __SYMBOL_PREFIX #set "\",25,0,0," __SYMBOL_PREFIX #symbol)
-#   define bss_set_element(set, symbol)	?error Must use initialized data.
-#  endif /* XCOFF */
-#  define symbol_set_define(set)	void *const (set)[1];
-#  define symbol_set_declare(set)	extern void *const (set)[1];
-
-#  define symbol_set_first_element(set)	&(set)[1]
-#  define symbol_set_end_p(set, ptr)	(*(ptr) == 0)
-
-# endif	/* ELF.  */
-#else
-/* We cannot do anything in generial.  */
-# define text_set_element(set, symbol) asm ("")
-# define data_set_element(set, symbol) asm ("")
-# define bss_set_element(set, symbol) asm ("")
-# define symbol_set_define(set)		void *const (set)[1];
-# define symbol_set_declare(set)	extern void *const (set)[1];
-
-# define symbol_set_first_element(set)	&(set)[1]
-# define symbol_set_end_p(set, ptr)	(*(ptr) == 0)
-#endif	/* Have GNU ld.  */
-
-#if DO_VERSIONING
-# define symbol_version(real, name, version) \
-     _symbol_version(real, name, version)
-# define default_symbol_version(real, name, version) \
-     _default_symbol_version(real, name, version)
-# ifdef __ASSEMBLER__
-#  define _symbol_version(real, name, version) \
-     .symver real, name##@##version
-#  define _default_symbol_version(real, name, version) \
-     .symver real, name##@##@##version
-# else
-#  define _symbol_version(real, name, version) \
-     __asm__ (".symver " #real "," #name "@" #version)
-#  define _default_symbol_version(real, name, version) \
-     __asm__ (".symver " #real "," #name "@@" #version)
-# endif
-#else
-# define symbol_version(real, name, version)
-# define default_symbol_version(real, name, version) \
-  strong_alias(real, name)
-#endif
-
-#if defined HAVE_VISIBILITY_ATTRIBUTE && defined SHARED
-# define attribute_hidden __attribute__ ((visibility ("hidden")))
-#else
-# define attribute_hidden
-#endif
-
-/* Handling on non-exported internal names.  We have to do this only
-   for shared code.  */
-#ifdef SHARED
-# define INTUSE(name) name##_internal
-# define INTDEF(name) strong_alias (name, name##_internal)
-# define INTVARDEF(name) \
-  _INTVARDEF (name, name##_internal)
-# if defined HAVE_VISIBILITY_ATTRIBUTE
-#  define _INTVARDEF(name, aliasname) \
-  extern __typeof (name) aliasname __attribute__ ((alias (#name), \
-						   visibility ("hidden")));
-# else
-#  define _INTVARDEF(name, aliasname) \
-  extern __typeof (name) aliasname __attribute__ ((alias (#name)));
-# endif
-# define INTDEF2(name, newname) strong_alias (name, newname##_internal)
-# define INTVARDEF2(name, newname) _INTVARDEF (name, newname##_internal)
-#else
-# define INTUSE(name) name
-# define INTDEF(name)
-# define INTVARDEF(name)
-# define INTDEF2(name, newname)
-# define INTVARDEF2(name, newname)
-#endif
-
-#endif /* libc-symbols.h */
diff --git a/include/set-hooks.h b/include/set-hooks.h
deleted file mode 100644
index 9ed71b3..0000000
--- a/include/set-hooks.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Macros for using symbol sets for running lists of functions.
-   Copyright (C) 1994, 1995, 1997, 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 Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SET_HOOKS_H
-#define _SET_HOOKS_H 1
-
-#define __need_size_t
-#include <stddef.h>
-// #include <sys/cdefs.h>
-#define __unbounded
-
-#ifdef symbol_set_define
-/* Define a hook variable called NAME.  Functions put on this hook take
-   arguments described by PROTO.  Use `text_set_element (NAME, FUNCTION)'
-   from gnu-stabs.h to add a function to the hook.  */
-
-# define DEFINE_HOOK(NAME, PROTO)		\
-  typedef void __##NAME##_hook_function_t PROTO; \
-  symbol_set_define (NAME)
-
-# define DECLARE_HOOK(NAME, PROTO)		\
-  typedef void __##NAME##_hook_function_t PROTO;\
-  symbol_set_declare (NAME)
-
-/* Run all the functions hooked on the set called NAME.
-   Each function is called like this: `function ARGS'.  */
-
-# define RUN_HOOK(NAME, ARGS)				\
-do {							\
-  void *const *__unbounded ptr;				\
-  for (ptr = symbol_set_first_element (NAME);		\
-       ! symbol_set_end_p (NAME, ptr); ++ptr)		\
-    (*(__##NAME##_hook_function_t *) *ptr) ARGS;	\
-} while (0)
-
-/* Define a hook variable with NAME and PROTO, and a function called RUNNER
-   which calls each function on the hook in turn, with ARGS.  */
-
-# define DEFINE_HOOK_RUNNER(name, runner, proto, args) \
-DEFINE_HOOK (name, proto); \
-extern void runner proto; void runner proto { RUN_HOOK (name, args); }
-
-#else
-
-/* The system does not provide necessary support for this.  */
-# define DEFINE_HOOK(NAME, PROTO)
-
-# define DECLARE_HOOK(NAME, PROTO)
-
-# define RUN_HOOK(NAME, ARGS)
-
-# define DEFINE_HOOK_RUNNER(name, runner, proto, args)
-
-#endif
-
-#endif /* set-hooks.h */
diff --git a/signal/README b/signal/README
deleted file mode 100644
index 4963b26..0000000
--- a/signal/README
+++ /dev/null
@@ -1,12 +0,0 @@
-This directory provides a signal implementation, which is appropriate
-for operating systems where signals are managed at user-level.  It is
-up to the run-time to catch the signals and forward them to the
-implementation via, e.g., the pthread_kill_info_np call.
-
-The files in this directory are accompanied by the generic implementations
-found in sysdeps/generic/: killpg.c, raise.c, sigaddset.c, sigdelset.c,
-sigemptyset.c, sigfillset.c, siginterrupt.c, sigismember.c, signal.c,
-sigwait.c.
-
-This implementation was once used for a native port running on L4, but is not
-currently used in any libpthread port bundled in this release.
diff --git a/signal/TODO b/signal/TODO
deleted file mode 100644
index 1148abb..0000000
--- a/signal/TODO
+++ /dev/null
@@ -1,29 +0,0 @@
-Unimplemented Functionality
----------------------------
-
-We don't support interruptible functions.  That is, if a signal is
-delivered when a thread is in e.g. the write system call, then the
-write function should be interrupted and return EINTR when the signal
-handler is finished.  To realize this behavior, we could have a thread
-local interruptible flag and a setjmp buffer.  A function that is
-interruptible would fill the jump buffer and set the interruptible
-flag.  If a signal comes in and the interruptible flag is set, rather
-than resuming the thread, we longjmp to the buffer.
-
-If a signal action has set the SA_SIGINFO, the third argument must be
-a pointer to a ucontext describing the thread's interrupted state;
-this implementation passes NULL.  This isn't as bad as it sounds as
-the the ucontext family of functions are marked obsolete in SUSv3 with
-the advisory that any use of them should be replaced by the use of
-pthread functionality (cf. makecontext rationale).
-
-stop and continue signals are not implemented (as we need to stop all
-threads, this requires being in bed with libpthread).
-
-Implementation is not yet cancellation-safe.
-
-There are not even stubs for sighold, sigingore, sigpause, sigrelse,
-however, according to posix: "Use of any of these functions is
-unspecified in a multi-threaded process."
-
-Implement sigtimedwait, sigqueue.
\ No newline at end of file
diff --git a/signal/kill.c b/signal/kill.c
deleted file mode 100644
index 27c9c32..0000000
--- a/signal/kill.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* kill.c - Generic kill implementation.
-   Copyright (C) 2008 Free Software Foundation, Inc.
-   Written by Neal H. Walfield <neal@gnu.org>.
-
-   This file is part of the GNU Hurd.
-
-   The GNU Hurd is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public License
-   as published by the Free Software Foundation; either version 3 of
-   the License, or (at your option) any later version.
-
-   The GNU Hurd 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with this program.  If not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include "sig-internal.h"
-
-int
-kill (pid_t pid, int signo)
-{
-  if (pid != getpid ())
-    {
-      errno = EOPNOTSUPP;
-      return -1;
-    }
-
-  /* "Signals generated for the process shall be delivered to exactly
-     one of those threads within the process which is in a call to a
-     sigwait() function selecting that signal or has not blocked
-     delivery of the signal.  If there are no threads in a call to a
-     sigwait() function selecting that signal, and if all threads
-     within the process block delivery of the signal, the signal shall
-     remaing pending on the process" (2.4.1).  */
-
-  /* First, see if there is a waiter, which is interested in this
-     signal.  */
-  pthread_mutex_lock (&sig_lock);
-
-  struct sigwaiter *waiter;
-  for (waiter = sigwaiters; waiter; waiter = waiter->next)
-    if ((waiter->signals & sigmask (signo)))
-      /* Got a winner.  */
-      {
-	sigdelset (&process_pending, signo);
-
-	pthread_mutex_lock (&waiter->ss->lock);
-	sigdelset (&waiter->ss->pending, signo);
-
-	memset (&waiter->info, 0, sizeof (waiter->info));
-	waiter->info.si_signo = signo;
-
-	sigwaiter_unblock (waiter);
-
-	return 0;
-      }
-
-  pthread_mutex_unlock (&sig_lock);
-
-  /* XXX: We just generate the signal for the current thread.  If the
-     current thread has blocked the signal, the correct thing to do is
-     to iterate over all the other threads and find on that hasn't
-     blocked it.  */
-  return pthread_kill (pthread_self (), signo);
-}
-
diff --git a/signal/pt-kill-siginfo-np.c b/signal/pt-kill-siginfo-np.c
deleted file mode 100644
index 9bdf6cc..0000000
--- a/signal/pt-kill-siginfo-np.c
+++ /dev/null
@@ -1,88 +0,0 @@
-/* pthread-kill-siginfo-np.c - Generic pthread_kill_siginfo_np implementation.
-   Copyright (C) 2008 Free Software Foundation, Inc.
-   Written by Neal H. Walfield <neal@gnu.org>.
-
-   This file is part of the GNU Hurd.
-
-   The GNU Hurd is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public License
-   as published by the Free Software Foundation; either version 3 of
-   the License, or (at your option) any later version.
-
-   The GNU Hurd 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with this program.  If not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include "pt-internal.h"
-#include "sig-internal.h"
-
-int
-pthread_kill_siginfo_np (pthread_t tid, siginfo_t si)
-{
-  int sig = si.si_signo;
-
-  if (sig < 0 || sig >= NSIG)
-    return EINVAL;
-
-  if (sig == 0)
-    return 0;
-
-  struct signal_state *ss = &__pthread_getid (tid)->ss;
-
-  pthread_mutex_lock (&sig_lock);
-  pthread_mutex_lock (&ss->lock);
-
-  if (ss->sigwaiter && (ss->sigwaiter->signals & sigmask (si.si_signo)))
-    /* The thread is in a call to sigwait.  */
-    {
-      ss->sigwaiter->info = si;
-      sigwaiter_unblock (ss->sigwaiter);
-      return 0;
-    }
-
-  pthread_mutex_unlock (&sig_lock);
-
-  if (ss->actions[sig - 1].sa_handler == (void *) SIG_IGN
-      || (ss->actions[sig - 1].sa_handler == (void *) SIG_DFL
-	  && default_action (sig) == sig_ignore))
-    /* It is unclear (to me) what is supposed to happen when a signal
-       is generated for a thread, which is blocking that signal and
-       ignoring it.  POSIX does say that when the action associated
-       with a pending, blocked signal is set to SIG_IGN, the pending
-       signal is to be cleared.  Thus, it makes sense that any signal
-       set to ignore is discarded at generation.  */
-    {
-      pthread_mutex_unlock (&ss->lock);
-      return 0;
-    }
-
-
-  if ((sigmask (sig) & ss->blocked))
-    /* The signal is blocked.  Mark it pending.  */
-    {
-      ss->pending |= sigmask (sig);
-      pthread_mutex_unlock (&ss->lock);
-      return 0;
-    }
-
-  if (pthread_self () == tid
-      && (! (ss->actions[si.si_signo - 1].sa_flags & SA_ONSTACK)
-	  || (ss->stack.ss_flags & SS_DISABLE)
-	  || (ss->stack.ss_flags & SS_ONSTACK)))
-    /* We are sending a signal to ourself and we don't use an
-       alternate stack.  */
-    signal_dispatch (ss, &si);
-  else
-    signal_dispatch_lowlevel (ss, tid, si);
-
-  /* Don't unlock ss: signal_dispatch and signal_dispatch_lowlevel
-     assume ownership of the lock.  */
-
-  return 0;
-}
-
diff --git a/signal/sig-internal.c b/signal/sig-internal.c
deleted file mode 100644
index f73f38b..0000000
--- a/signal/sig-internal.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* sig-internal.c - Signal state functions.
-   Copyright (C) 2008 Free Software Foundation, Inc.
-   Written by Neal H. Walfield <neal@gnu.org>.
-
-   This file is part of the GNU Hurd.
-
-   The GNU Hurd is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public License
-   as published by the Free Software Foundation; either version 3 of
-   the License, or (at your option) any later version.
-
-   The GNU Hurd 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with this program.  If not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include "sig-internal.h"
-
-pthread_mutex_t sig_lock = PTHREAD_MUTEX_INITIALIZER;
-
-sigset_t process_pending;
-siginfo_t process_pending_info[NSIG];
diff --git a/signal/sig-internal.h b/signal/sig-internal.h
deleted file mode 100644
index 6c86c79..0000000
--- a/signal/sig-internal.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/* sig-internal.h - Internal signal handling interface.
-   Copyright (C) 2008 Free Software Foundation, Inc.
-   Written by Neal H. Walfield <neal@gnu.org>.
-
-   This file is part of the GNU Hurd.
-
-   The GNU Hurd is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public License
-   as published by the Free Software Foundation; either version 3 of
-   the License, or (at your option) any later version.
-
-   The GNU Hurd 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with this program.  If not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef SIG_INTERNAL_H
-#define SIG_INTERNAL_H
-
-#include <signal.h>
-
-#include <sig-sysdep.h>
-
-#define sigmask(sig) (1ULL << (sig - 1))
-#define STOPSIGS (sigmask (SIGTTIN) | sigmask (SIGTTOU) | \
-		  sigmask (SIGSTOP) | sigmask (SIGTSTP))
-
-/* General lock.  Protects PROCESS_PENDING, PROCESS_PENDING_INFO,
-   SIGWAITERS.  */
-extern pthread_mutex_t sig_lock;
-
-/* "Signals generated for the process shall be delivered to exactly
-   one of those threads within the process which is in a call to a
-   sigwait() function selecting that signal or has not blocked
-   delivery of the signal.  If there are no threads in a call to a
-   sigwait() function selecting that signal, and if all threads within
-   the process block delivery of the signal, the signal shall remaing
-   pending on the process"  (2.4.1).
-
-   This variable is protected by SIG_LOCK.  */
-extern sigset_t process_pending;
-extern siginfo_t process_pending_info[NSIG];
-\f
-struct sigwaiter;
-
-/* The per-thread signal state.  */
-struct signal_state
-{
-  /* Protects the following fields.  STACK.SA_FLAGS may be accessed
-     using atomic operations.  */
-  pthread_mutex_t lock;
-
-  /* Pending signals.  */
-  sigset_t pending;
-
-  /* Blocked signals (i.e., the signal mask).  */
-  sigset_t blocked;
-
-  stack_t stack;
-  struct sigaction actions[NSIG];
-  siginfo_t info[NSIG];
-
-  /* If the thread is blocked in a call to sigwait.  */
-  struct sigwaiter *sigwaiter;
-};
-
-#define PTHREAD_SIGNAL_MEMBERS struct signal_state ss;
-
-/* Arranges for thread TID to call signal_dispatch.  Must not be
-   called if TID is the caller and an alternate stack is not required.
-   In this case, the caller should call signal_dispatch directly.  */
-extern void signal_dispatch_lowlevel (struct signal_state *ss,
-				      pthread_t tid, siginfo_t si);
-
-/* This is the signal handler entry point.  A thread is forced into
-   this state when it receives a signal.  We need to save the thread's
-   state and then invoke the high-level signal dispatcher.  SS->LOCK
-   is locked by the caller.  */
-extern void signal_dispatch (struct signal_state *ss, siginfo_t *si);
-
-#ifndef SIGNAL_DISPATCH_ENTRY
-#define SIGNAL_DISPATCH_ENTRY
-#endif
-
-#ifndef SIGNAL_DISPATCH_EXIT
-#define SIGNAL_DISPATCH_EXIT
-#endif
-\f
-/* When a thread calls sigwait and a requested signal is not pending,
-   it allocates the following structure, fills it in, adds it to
-   sigwaiters and sleeps.  */
-struct sigwaiter
-{
-  struct sigwaiter *next;
-  struct sigwaiter *prev;
-
-  /* Thread's signal state.  */
-  struct signal_state *ss;
-
-  /* Signals this thread is waiting for.  */
-  sigset_t signals;
-
-  /* The selected signal is returned here.  The waiter also
-     futex_waits on this info.si_signo.  */
-  siginfo_t info;
-};
-
-/* This variable is protected by SIG_LOCK.  */
-extern struct sigwaiter *sigwaiters;
-
-/* Block the caller waiting for a signal in set SET.  SIG_LOCK and
-   SS->LOCK must be held and will be unlocked by this function before
-   blocking.  */
-extern siginfo_t sigwaiter_block (struct signal_state *ss,
-				  const sigset_t *restrict set);
-
-/* Unblock the waiter WAITER.  SIG_LOCK and WAITER->SS->LOCK must be
-   held.  Both will be dropped on return.  */
-extern void sigwaiter_unblock (struct sigwaiter *waiter);
-\f
-enum sig_action { sig_core, sig_terminate, sig_ignore, sig_cont, sig_stop };
-
-static inline enum sig_action
-default_action (int signo)
-{
-  switch (signo)
-    {
-    case SIGABRT:
-    case SIGBUS:
-    case SIGFPE:
-    case SIGILL:
-    case SIGQUIT:
-    case SIGSEGV:
-    case SIGSTKFLT:
-    case SIGSYS:
-    case SIGTRAP:
-    case SIGXCPU:
-    case SIGXFSZ:
-      return sig_core;
-
-    case SIGALRM:
-    case SIGHUP:
-    case SIGINT:
-    case SIGIO: /* Perhaps ignore?  */
-    case SIGKILL:
-    case SIGPIPE:
-    case SIGPROF:
-    case SIGTERM:
-    case SIGUSR1:
-    case SIGUSR2:
-    case SIGVTALRM:
-      return sig_terminate;
-
-    case SIGCHLD:
-    case SIGPWR:
-    case SIGURG:
-    case SIGWINCH:
-      return sig_ignore;
-
-    case SIGCONT:
-      return sig_cont;
-
-    case SIGSTOP:
-    case SIGTSTP:
-    case SIGTTIN:
-    case SIGTTOU:
-      return sig_stop;
-    }
-
-  panic ("Unknown signal number: %d", signo);
-}
-
-#endif
diff --git a/signal/sigaction.c b/signal/sigaction.c
deleted file mode 100644
index 0126c99..0000000
--- a/signal/sigaction.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/* sigaction.c - Generic sigaction implementation.
-   Copyright (C) 2008 Free Software Foundation, Inc.
-   Written by Neal H. Walfield <neal@gnu.org>.
-
-   This file is part of the GNU Hurd.
-
-   The GNU Hurd is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public License
-   as published by the Free Software Foundation; either version 3 of
-   the License, or (at your option) any later version.
-
-   The GNU Hurd 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with this program.  If not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include "sig-internal.h"
-#include "pt-internal.h"
-
-int
-sigaction (int sig, const struct sigaction *restrict sa,
-	   struct sigaction *restrict osa)
-{
-  if (sig <= 0 || sig >= NSIG)
-    {
-      errno = EINVAL;
-      return -1;
-    }
-
-  struct signal_state *ss = &_pthread_self ()->ss;
-
-  pthread_mutex_lock (&ss->lock);
-
-  if (osa)
-    *osa = ss->actions[sig - 1];
-
-  if (sa)
-    {
-      ss->actions[sig - 1] = *sa;
-
-      /* "The SIGKILL and SIGSTOP signals shall not be added to the
-	 signal mask using this mechanism; this restriction shall be
-	 enforced by the system without causing an error to be
-	 indicated" (sigaction).  */
-      sigdelset (&ss->blocked, SIGKILL);
-      sigdelset (&ss->blocked, SIGSTOP);
-
-      /* A "signal shall remain pending on the process until it is
-	 unblocked, it is accepted when ..., or the action associated
-	 with it is set to ignore the signal"  (2.4.1).
-
-         "Setting a signal action to SIG_DFL for a signal that is
-         pending, and whose default action is to ignore the signal,
-         ..., shall cause the pending signal to be discarded, whether
-         or not it is blocked" (2.4.3).  */
-      if (sa->sa_handler == SIG_IGN
-	  || (sa->sa_handler == SIG_DFL && default_action (sig) == sig_ignore))
-	{
-	  sigdelset (&ss->pending, sig);
-	  sigdelset (&process_pending, sig);
-	}
-    }
-
-  pthread_mutex_unlock (&ss->lock);
-
-  return 0;
-}
-
diff --git a/signal/sigaltstack.c b/signal/sigaltstack.c
deleted file mode 100644
index 8334811..0000000
--- a/signal/sigaltstack.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/* sigaltstack.c - Generic sigaltstack implementation.
-   Copyright (C) 2008 Free Software Foundation, Inc.
-   Written by Neal H. Walfield <neal@gnu.org>.
-
-   This file is part of the GNU Hurd.
-
-   The GNU Hurd is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public License
-   as published by the Free Software Foundation; either version 3 of
-   the License, or (at your option) any later version.
-
-   The GNU Hurd 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with this program.  If not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include "sig-internal.h"
-#include "pt-internal.h"
-
-int
-sigaltstack (const stack_t *restrict stack, stack_t *restrict old)
-{
-  int err = 0;
-  struct signal_state *ss = &_pthread_self ()->ss;
-
-  pthread_mutex_lock (&ss->lock);
-
-  if (old)
-    *old = ss->stack;
-
-  if (stack)
-    {
-      if (stack->ss_size < MINSIGSTKSZ)
-	{
-	  err = ENOMEM;
-	  goto out;
-	}
-
-      if ((stack->ss_flags & ~(SS_DISABLE)))
-	/* Flags contains a value other than SS_DISABLE.  */
-	{
-	  err = EINVAL;
-	  goto out;
-	}
-
-      if ((ss->stack.ss_flags & SS_ONSTACK))
-	/* Stack in use.  */
-	{
-	  err = EPERM;
-	  goto out;
-	}
-
-      ss->stack = *stack;
-    }
-
- out:
-  pthread_mutex_unlock (&ss->lock);
-
-  if (err)
-    {
-      errno = err;
-      return -1;
-    }
-  return 0;
-}
diff --git a/signal/signal-dispatch.c b/signal/signal-dispatch.c
deleted file mode 100644
index 40440b7..0000000
--- a/signal/signal-dispatch.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/* signal-dispatch.c - Signal dispatcher.
-   Copyright (C) 2008 Free Software Foundation, Inc.
-   Written by Neal H. Walfield <neal@gnu.org>.
-
-   This file is part of the GNU Hurd.
-
-   The GNU Hurd is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public License
-   as published by the Free Software Foundation; either version 3 of
-   the License, or (at your option) any later version.
-
-   The GNU Hurd 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with this program.  If not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include "sig-internal.h"
-
-/* This is the signal handler entry point.  A thread is forced into
-   this state when it receives a signal.  We need to save the thread's
-   state and then invoke the high-level signal dispatcher.  SS->LOCK
-   is locked by the caller.  */
-void
-signal_dispatch (struct signal_state *ss, siginfo_t *si)
-{
-  SIGNAL_DISPATCH_ENTRY;
-
-  int signo = si->si_signo;
-
-  assert (signo > 0 && signo < NSIG);
-  assert (pthread_mutex_trylock (&ss->lock) == EBUSY);
-
-  do
-    {
-      if ((sigmask (signo) & STOPSIGS))
-	/* Stop signals clear a pending SIGCONT even if they
-	   are handled or ignored (but not if preempted).  */
-	{
-	  sigdelset (&ss->pending, SIGCONT);
-	  sigdelset (&process_pending, SIGCONT);
-	}
-      else if ((signo == SIGCONT))
-	/* Even if handled or ignored (but not preempted), SIGCONT
-	   clears stop signals and resumes the process.  */
-	{
-	  ss->pending &= ~STOPSIGS;
-	  process_pending &= ~STOPSIGS;
-	}
-
-      void (*handler)(int, siginfo_t *, void *)
-	= ss->actions[signo - 1].sa_sigaction;
-
-      /* Reset to SIG_DFL if requested.  SIGILL and SIGTRAP cannot
-	 be automatically reset when delivered; the system silently
-	 enforces this restriction (sigaction).  */
-      if (ss->actions[signo - 1].sa_flags & SA_RESETHAND
-	  && signo != SIGILL && signo != SIGTRAP)
-	ss->actions[signo - 1].sa_handler = SIG_DFL;
-
-      sigset_t orig_blocked = ss->blocked;
-      /* Block requested signals while running the handler.  */
-      ss->blocked |= ss->actions[signo - 1].sa_mask;
-
-      /* Block SIGNO unless we're asked not to.  */
-      if (! (ss->actions[signo - 1].sa_flags & (SA_RESETHAND | SA_NODEFER)))
-	sigaddset (&ss->blocked, signo);
-
-      sigdelset (&ss->pending, signo);
-      pthread_mutex_unlock (&ss->lock);
-
-      pthread_mutex_lock (&sig_lock);
-      sigdelset (&process_pending, signo);
-      pthread_mutex_unlock (&sig_lock);
-
-      if (handler == (void *) SIG_DFL)
-	{
-	  enum sig_action action = default_action (signo);
-
-	  if (action == sig_terminate || action == sig_core)
-	    _exit (128 + signo);
-
-	  if (action == sig_stop)
-	    /* XXX: Implement me.  */
-	    panic ("Stopping process unimplemented.");
-
-	  if (action == sig_cont)
-	    /* XXX: Implement me.  */;
-	    panic ("Continuing process unimplemented.");
-	}
-      else if (handler == (void *) SIG_IGN)
-	;
-      else
-	handler (signo, si, NULL);
-
-      pthread_mutex_lock (&ss->lock);
-
-      /* "When a thread's signal mask is changed in a signal-catching
-	 function that is installed by sigaction(), the restoration of
-	 the signal mask on return from the signal-catching function
-	 overrides that change (see sigaction())" (sigprocmask).  */
-      ss->blocked = orig_blocked;
-
-      sigset_t pending = ~ss->blocked & ss->pending;
-      if (! pending)
-	pending = ~ss->blocked & process_pending;
-      signo = l4_lsb64 (pending);
-    }
-  while (signo);
-
-  pthread_mutex_unlock (&ss->lock);
-
-  SIGNAL_DISPATCH_EXIT;
-}
diff --git a/signal/signal.h b/signal/signal.h
deleted file mode 100644
index 6e22d05..0000000
--- a/signal/signal.h
+++ /dev/null
@@ -1,275 +0,0 @@
-/* signal.h - Signal handling interface.
-   Copyright (C) 2008 Free Software Foundation, Inc.
-   Written by Neal H. Walfield <neal@gnu.org>.
-
-   This file is part of the GNU Hurd.
-
-   The GNU Hurd is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public License
-   as published by the Free Software Foundation; either version 3 of
-   the License, or (at your option) any later version.
-
-   The GNU Hurd 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with this program.  If not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#ifndef _SIGNAL_H
-#define _SIGNAL_H 1
-
-#include <stdint.h>
-#include <sys/types.h>
-
-typedef volatile int sig_atomic_t;
-\f
-/*typedef uint64_t sigset_t;*/
-
-int sigaddset (sigset_t *, int);
-int sigdelset (sigset_t *, int);
-int sigemptyset (sigset_t *);
-int sigfillset (sigset_t *);
-int sigismember (const sigset_t *, int);
-\f
-/* These values are consistent with Linux.  */
-#define SIGRTMIN 34
-#define SIGRTMAX 64
-
-enum
-  {
-    SIGHUP = 1,
-#define SIGHUP SIGHUP
-    SIGINT,
-#define SIGINT SIGINT
-    SIGQUIT,
-#define SIGQUIT SIGQUIT
-    SIGILL,
-#define SIGILL SIGILL
-    SIGTRAP,
-#define SIGTRAP SIGTRAP
-    SIGABRT,
-#define SIGABRT SIGABRT
-    SIGBUS,
-#define SIGBUS SIGBUS
-    SIGFPE,
-#define SIGFPE SIGFPE
-    SIGKILL,
-#define SIGKILL SIGKILL
-    SIGUSR1,
-#define SIGUSR1 SIGUSR1
-    SIGSEGV,
-#define SIGSEGV SIGSEGV
-    SIGUSR2,
-#define SIGUSR2 SIGUSR2
-    SIGPIPE,
-#define SIGPIPE SIGPIPE
-    SIGALRM,
-#define SIGALRM SIGALRM
-    SIGTERM,
-#define SIGTERM SIGTERM
-    SIGSTKFLT,
-#define SIGSTKFLT SIGSTKFLT
-    SIGCHLD,
-#define SIGCHLD SIGCHLD
-    SIGCONT,
-#define SIGCONT SIGCONT
-    SIGSTOP,
-#define SIGSTOP SIGSTOP
-    SIGTSTP,
-#define SIGTSTP SIGTSTP
-    SIGTTIN,
-#define SIGTTIN SIGTTIN
-    SIGTTOU,
-#define SIGTTOU SIGTTOU
-    SIGURG,
-#define SIGURG SIGURG
-    SIGXCPU,
-#define SIGXCPU SIGXCPU
-    SIGXFSZ,
-#define SIGXFSZ SIGXFSZ
-    SIGVTALRM,
-#define SIGVTALRM SIGVTALRM
-    SIGPROF,
-#define SIGPROF SIGPROF
-    SIGWINCH,
-#define SIGWINCH SIGWINCH
-    SIGIO,
-#define SIGIO SIGIO
-    SIGPWR,
-#define SIGPWR SIGPWR
-    SIGSYS,
-#define SIGSYS SIGSYS
-    NSIG
-  };
-\f
-/* The resulting set is the union of the current set and the signal
-   set pointed to by the argument set.  */
-#define SIG_BLOCK 1
-/* The resulting set is the intersection of the current set and the
-   complement of the signal set pointed to by the argument set.  */
-#define SIG_UNBLOCK 2
-/* The resulting set is the signal set pointed to by the argument
-   set.  */
-#define SIG_SETMASK 3
-
-int pthread_sigmask (int how, const sigset_t *mask, sigset_t *old);
-int sigprocmask (int how, const sigset_t *restrict mask,
-		 sigset_t *restrict old);
-
-/* Return set of pending signals.  */
-int sigpending(sigset_t *set);
-\f
-union sigval
-{
-  int sival_int;
-  void *sival_ptr;
-};
-\f
-#define SIG_DFL ((void (*)(int)) (0))
-#define SIG_ERR ((void (*)(int)) (-1))
-#define SIG_IGN ((void (*)(int)) (1))
-
-/* Causes signal delivery to occur on an alternate stack.  */
-#define SA_ONSTACK (1 << 0)
-/* Do not generate SIGCHLD when children stop or stopped children
-   continue.  */
-#define SA_NOCLDSTOP (1 << 1)
-/* Causes signal dispositions to be set to SIG_DFL on entry to signal
-   handlers.  */
-#define SA_RESETHAND (1 << 2)
-/* Causes certain functions to become restartable.  */
-#define SA_RESTART (1 << 3)
-/* Causes extra information to be passed to signal handlers at the
-   time of receipt of a signal.  */
-#define SA_SIGINFO (1 << 4)
-/* Causes implementations not to create zombie processes on child
-   death.  */
-#define SA_NOCLDWAIT (1 << 5)
-/* Causes signal not to be automatically blocked on entry to
-   signal handler.  */
-#define SA_NODEFER (1 << 6)
-
-typedef struct
-{
-  int si_signo;
-  int si_code;
-  int si_errno;
-  pid_t si_pid;
-  uid_t si_uid;
-  void *si_addr;
-  int si_status;
-  long si_band;
-  union sigval si_value;
-} siginfo_t;
-
-struct sigaction
-{
-  union
-  {
-    /* Pointer to a signal-catching function or one of the macros
-       SIG_IGN or SIG_DFL.  */
-    void (*sa_handler)(int);
-                   
-    /* Pointer to a signal-catching function.  */
-    void (*sa_sigaction)(int, siginfo_t *, void *);
-  };
-
-  /* Set of signals to be blocked during execution of the signal
-     handling function.  */
-  sigset_t sa_mask;
-
-  /* Special flags.  */
-  int sa_flags;
-};
-
-int sigaction (int signo, const struct sigaction *restrict newaction,
-	       struct sigaction *restrict oldaction);
-
-void (*signal (int signo, void (*handler)(int)))(int);
-void (*bsd_signal (int signo, void (*handler)(int)))(int);
-\f
-/* Process is executing on an alternate signal stack.  */
-#define SS_ONSTACK (1 << 0)
-/* Alternate signal stack is disabled.  */
-#define SS_DISABLE (1 << 1)
-
-/* Minimum stack size for a signal handler.  */
-#define MINSIGSTKSZ PAGESIZE
-/* Default size in bytes for the alternate signal stack. */
-#define SIGSTKSZ (16 * PAGESIZE)
-
-typedef struct
-{
-  void *ss_sp;
-  size_t ss_size;
-  int ss_flags;
-} stack_t;
-
-int sigaltstack(const stack_t *restrict stack, stack_t *restrict old);
-\f
-#include <pthread.h>
-
-/* Send SIGNO to the process PID.  */
-int kill(pid_t pid, int signo);
-
-/* Send SIGNO to the process group PG.  */
-int killpg(pid_t pg, int signo);
-
-/* Send SIGNO to thread TID.  */
-int pthread_kill(pthread_t tid, int signo);
-
-/* Send a signal to thread TID using SIGINFO.  */
-int pthread_kill_siginfo_np (pthread_t tid, siginfo_t siginfo);
-
-/* Send SIGNO to the calling thread.  */
-int raise(int signo);
-\f
-typedef struct sigevent
-{
-  /* Notification type.  */
-  int sigev_notify;
-
-  /* Signal number.  */
-  int sigev_signo;
-
-  /* Signal value.  */
-  union sigval sigev_value;
-
-  /* Notification function.  */
-  void (*sigev_notify_function) (union sigval);
-
-  /* Notification attributes.  */
-  pthread_attr_t *sigev_notify_attributes;
-} sigevent_t;
-
-enum
-  {
-    SIGEV_NONE = 0,
-#define SIGEV_NONE SIGEV_NONE
-    SIGEV_SIGNAL,
-#define SIGEV_SIGNAL SIGEV_SIGNAL
-    SIGEV_THREAD
-#define SIGEV_THREAD SIGEV_THREAD
-  };
-\f
-#define SIG_HOLD
-
-int sighold (int);
-int sigignore (int);
-int siginterrupt (int, int);
-int sigpause (int);
-int sigqueue (pid_t, int, const union sigval);
-int sigrelse (int);
-void (*sigset (int, void (*)(int)))(int);
-int sigsuspend (const sigset_t *);
-\f
-/* Wait for a signal.  */
-int sigwait (const sigset_t *restrict set, int *restrict signo);
-int sigwaitinfo (const sigset_t *restrict set, siginfo_t *restrict info);
-int sigtimedwait (const sigset_t *restrict set, siginfo_t *restrict info,
-		  const struct timespec *restrict timespec);
-
-#endif
diff --git a/signal/sigpending.c b/signal/sigpending.c
deleted file mode 100644
index 609b55d..0000000
--- a/signal/sigpending.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* sigpending.c - Generic sigpending implementation.
-   Copyright (C) 2008 Free Software Foundation, Inc.
-   Written by Neal H. Walfield <neal@gnu.org>.
-
-   This file is part of the GNU Hurd.
-
-   The GNU Hurd is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public License
-   as published by the Free Software Foundation; either version 3 of
-   the License, or (at your option) any later version.
-
-   The GNU Hurd 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with this program.  If not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <sig-internal.h>
-#include <pt-internal.h>
-
-int
-sigpending (sigset_t *set)
-{
-  struct signal_state *ss = &_pthread_self ()->ss;
-
-  pthread_mutex_lock (&ss->lock);
-
-  /* There is no need to lock SIG_LOCK for process_pending since we
-     just read it, which is atomic.  */
-  *set = (ss->pending | process_pending) & ss->blocked;
-
-  pthread_mutex_unlock (&ss->lock);
-
-  return 0;
-}
diff --git a/signal/sigsuspend.c b/signal/sigsuspend.c
deleted file mode 100644
index 73cf12a..0000000
--- a/signal/sigsuspend.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* sigsuspend.c - Generic sigsuspend implementation.
-   Copyright (C) 2008 Free Software Foundation, Inc.
-   Written by Neal H. Walfield <neal@gnu.org>.
-
-   This file is part of the GNU Hurd.
-
-   The GNU Hurd is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public License
-   as published by the Free Software Foundation; either version 3 of
-   the License, or (at your option) any later version.
-
-   The GNU Hurd 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with this program.  If not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include "sig-internal.h"
-
-int
-sigsuspend (const sigset_t *set)
-{
-  /* XXX: Implement me.  */
-  errno = EOPNOTSUPP;
-  return -1;
-}
diff --git a/signal/sigtimedwait.c b/signal/sigtimedwait.c
deleted file mode 100644
index 52cd017..0000000
--- a/signal/sigtimedwait.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* sigtimedwait.c - Generic sigtimedwait implementation.
-   Copyright (C) 2008 Free Software Foundation, Inc.
-   Written by Neal H. Walfield <neal@gnu.org>.
-
-   This file is part of the GNU Hurd.
-
-   The GNU Hurd is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public License
-   as published by the Free Software Foundation; either version 3 of
-   the License, or (at your option) any later version.
-
-   The GNU Hurd 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with this program.  If not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include "sig-internal.h"
-
-int
-sigtimedwait (const sigset_t *restrict set, siginfo_t *restrict info,
-	      const struct timespec *restrict timeout)
-{
-  errno = EOPNOTSUPP;
-  return -1;
-}
-
diff --git a/signal/sigwaiter.c b/signal/sigwaiter.c
deleted file mode 100644
index 8d041ac..0000000
--- a/signal/sigwaiter.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/* sigwaiter.c - Signal handling functions.
-   Copyright (C) 2008 Free Software Foundation, Inc.
-   Written by Neal H. Walfield <neal@gnu.org>.
-
-   This file is part of the GNU Hurd.
-
-   The GNU Hurd is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public License
-   as published by the Free Software Foundation; either version 3 of
-   the License, or (at your option) any later version.
-
-   The GNU Hurd 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with this program.  If not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include "sig-internal.h"
-
-#include <hurd/futex.h>
-
-struct sigwaiter *sigwaiters;
-
-siginfo_t
-sigwaiter_block (struct signal_state *ss, const sigset_t *restrict set)
-{
-  assert (pthread_mutex_trylock (&sig_lock) == EBUSY);
-  assert (pthread_mutex_trylock (&ss->lock) == EBUSY);
-
-  assert (! ss->sigwaiter);
-
-  struct sigwaiter waiter;
-
-  waiter.next = sigwaiters;
-  if (waiter.next)
-    {
-      assert (! waiter.next->prev);
-      waiter.next->prev = &waiter;
-    }
-  waiter.prev = 0;
-  sigwaiters = &waiter;
-
-  waiter.ss = ss;
-  waiter.info.si_signo = 0;
-  waiter.signals = *set;
-
-  ss->sigwaiter = &waiter;
-
-  pthread_mutex_unlock (&ss->lock);
-  pthread_mutex_unlock (&sig_lock);
-
-  futex_wait (&waiter.info.si_signo, 0);
-
-#ifndef NDEBUG
-  pthread_mutex_lock (&ss->lock);
-  ss->sigwaiter = 0;
-  pthread_mutex_unlock (&ss->lock);
-#endif
-
-  assert (waiter.info.si_signo);
-  return waiter.info;
-}
-
-void
-sigwaiter_unblock (struct sigwaiter *waiter)
-{
-  assert (pthread_mutex_trylock (&sig_lock) == EBUSY);
-  assert (pthread_mutex_trylock (&waiter->ss->lock) == EBUSY);
-
-  struct sigwaiter *prev = waiter->prev;
-  struct sigwaiter *next = waiter->next;
-
-  if (next)
-    next->prev = prev;
-
-  if (prev)
-    prev->next = next;
-  else
-    sigwaiters = next;
-
-  sigdelset (&process_pending, waiter->info.si_signo);
-  sigdelset (&waiter->ss->pending, waiter->info.si_signo);
-
-  pthread_mutex_unlock (&waiter->ss->lock);
-  pthread_mutex_unlock (&sig_lock);
-
-  futex_wake (&waiter->info.si_signo, 1);
-}
diff --git a/signal/sigwaitinfo.c b/signal/sigwaitinfo.c
deleted file mode 100644
index 1b47079..0000000
--- a/signal/sigwaitinfo.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* sigwaitinfo.c - Generic sigwaitinfo implementation.
-   Copyright (C) 2008 Free Software Foundation, Inc.
-   Written by Neal H. Walfield <neal@gnu.org>.
-
-   This file is part of the GNU Hurd.
-
-   The GNU Hurd is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public License
-   as published by the Free Software Foundation; either version 3 of
-   the License, or (at your option) any later version.
-
-   The GNU Hurd 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
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with this program.  If not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <sig-internal.h>
-#include <pt-internal.h>
-
-int
-sigwaitinfo (const sigset_t *restrict set, siginfo_t *restrict info)
-{
-  pthread_mutex_lock (&sig_lock);
-
-  struct signal_state *ss = &_pthread_self ()->ss;
-
-  pthread_mutex_lock (&ss->lock);
-
-  if ((process_pending & *set) || (ss->pending & *set))
-    /* There is at least one signal pending.  */
-    {
-      bool local = true;
-      sigset_t extant = process_pending & *set;
-      if (! extant)
-	{
-	  local = false;
-	  extant = ss->pending & *set;
-	}
-
-      assert (extant);
-
-      int signo = l4_msb64 (extant);
-
-      if (info)
-	{
-	  if (local)
-	    *info = ss->info[signo - 1];
-	  else
-	    *info = process_pending_info[signo - 1];
-	  info->si_signo = signo;
-	}
-
-      sigdelset (&process_pending, signo);
-      sigdelset (&ss->pending, signo);
-
-      pthread_mutex_unlock (&ss->lock);
-      pthread_mutex_unlock (&sig_lock);
-      return 0;
-    }
-
-  siginfo_t i = sigwaiter_block (ss, set);
-  assert (i.si_signo);
-  assert ((sigmask (i.si_signo) & *set));
-
-  if (info)
-    *info = i;
-
-  return 0;
-}
-
-- 
1.9.0


From 6eaedb37037965b99608cb8afbfc934c3396892e Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Sun, 30 Mar 2014 17:23:12 +0000
Subject: [PATCH 4/6] Revert

commit 69e89a859882e4f675dd5491edc969159d8a4002
Author: Pino Toscano <toscano.pino@tiscali.it>
Date:   Sun Apr 22 00:38:26 2012 +0200

    __pthread_timedblock: switch to clock_gettime

    Use `clock_gettime' with the provided clock instead of
`gettimeofday',
    linking to rt.

    * sysdeps/mach/pt-timedblock.c (__pthread_timedblock): Switch to
    `clock_gettime'.
    * Makefile [!IN_GLIBC] (LDLIBS): Link to rt.
    [IN_GLIBC] ($(objpfx)libpthread.so): Likewise.
    * Makefile.am (libpthread_a_LDADD): Likewise.
---
 Makefile                               |  2 --
 sysdeps/generic/pt-condattr-setclock.c | 28 ++++------------------------
 sysdeps/mach/pt-timedblock.c           | 13 +++++++------
 3 files changed, 11 insertions(+), 32 deletions(-)

diff --git a/Makefile b/Makefile
index 8ef990e..2f45c1c 100644
--- a/Makefile
+++ b/Makefile
@@ -216,10 +216,8 @@ VPATH += $(SYSDEP_PATH)
 
 ifeq ($(IN_GLIBC),no)
 HURDLIBS = ihash
-LDLIBS = -lrt
 else
 LDLIBS-pthread.so = -lihash
-$(objpfx)libpthread.so: $(common-objpfx)rt/librt.so
 endif
 
 ifeq ($(IN_GLIBC),no)
diff --git a/sysdeps/generic/pt-condattr-setclock.c b/sysdeps/generic/pt-condattr-setclock.c
index c5a78ef..c9a9948 100644
--- a/sysdeps/generic/pt-condattr-setclock.c
+++ b/sysdeps/generic/pt-condattr-setclock.c
@@ -23,30 +23,10 @@
 int
 pthread_condattr_setclock (pthread_condattr_t *attr, clockid_t clock)
 {
-  /* Only a few clocks are allowed.  CLOCK_REALTIME is always allowed.
-     CLOCK_MONOTONIC only if the kernel has the necessary support.  */
-  if (clock == CLOCK_MONOTONIC)
+  if (__pthread_default_condattr.clock == clock)
     {
-      /* Check whether the clock is available.  */
-      static int avail;
-
-      if (avail == 0)
-	{
-	  struct timespec ts;
-	  int res;
-
-	  res = clock_getres (CLOCK_MONOTONIC, &ts);
-	  avail = res < 0 ? -1 : 1;
-	}
-
-      if (avail < 0)
-	/* Not available.  */
-	return EINVAL;
+      attr->clock = clock;
+      return 0;
     }
-  else if (clock != CLOCK_REALTIME)
-    return EINVAL;
-
-  attr->clock = clock;
-
-  return 0;
+  return EINVAL;
 }
diff --git a/sysdeps/mach/pt-timedblock.c b/sysdeps/mach/pt-timedblock.c
index d72ef73..88beaa2 100644
--- a/sysdeps/mach/pt-timedblock.c
+++ b/sysdeps/mach/pt-timedblock.c
@@ -36,26 +36,27 @@ __pthread_timedblock (struct __pthread *thread,
   error_t err;
   mach_msg_header_t msg;
   mach_msg_timeout_t timeout;
-  struct timespec now;
+  struct timeval now;
 
   /* We have an absolute time and now we have to convert it to a
      relative time.  Arg.  */
 
-  err = clock_gettime (clock_id, &now);
+  err = gettimeofday(&now, NULL);
   assert (! err);
 
   if (now.tv_sec > abstime->tv_sec
       || (now.tv_sec == abstime->tv_sec
-	  && now.tv_nsec > abstime->tv_nsec))
+	  && now.tv_usec > ((abstime->tv_nsec + 999) / 1000)))
     return ETIMEDOUT;
 
   timeout = (abstime->tv_sec - now.tv_sec) * 1000;
 
-  if (abstime->tv_nsec >= now.tv_nsec)
-    timeout += (abstime->tv_nsec - now.tv_nsec + 999999) / 1000000;
+  if (((abstime->tv_nsec + 999) / 1000) >= now.tv_usec)
+    timeout += (((abstime->tv_nsec + 999) / 1000) - now.tv_usec + 999) / 1000;
   else
     /* Need to do a carry.  */
-    timeout -= (now.tv_nsec - abstime->tv_nsec + 999999) / 1000000;
+    timeout -= (now.tv_usec + 999) / 1000 -
+      ((abstime->tv_nsec + 999999) / 1000000);
 
   err = __mach_msg (&msg, MACH_RCV_MSG | MACH_RCV_TIMEOUT, 0,
 		    sizeof msg, thread->wakeupmsg.msgh_remote_port,
-- 
1.9.0


From 3efea8fcd703838e110ca1d98dcda54ac407e4cb Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Sun, 30 Mar 2014 20:47:54 +0000
Subject: [PATCH 5/6] fix

---
 sysdeps/mach/hurd/pt-sigstate.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/sysdeps/mach/hurd/pt-sigstate.c b/sysdeps/mach/hurd/pt-sigstate.c
index 68c79c5..d3f4368 100644
--- a/sysdeps/mach/hurd/pt-sigstate.c
+++ b/sysdeps/mach/hurd/pt-sigstate.c
@@ -21,6 +21,7 @@
 #include <assert.h>
 #include <signal.h>
 #include <hurd/signal.h>
+#include <hurd/msg.h>
 
 #include <pt-internal.h>
 
@@ -31,11 +32,12 @@ __pthread_sigstate (struct __pthread *thread, int how,
 {
   error_t err = 0;
   struct hurd_sigstate *ss;
+  sigset_t pending;
 
   ss = _hurd_thread_sigstate (thread->kernel_thread);
   assert (ss);
 
-  __pthread_spin_lock (&ss->lock);
+  _hurd_sigstate_lock (ss);
 
   if (oset)
     *oset = ss->blocked;
@@ -63,7 +65,13 @@ __pthread_sigstate (struct __pthread *thread, int how,
   if (! err && clear_pending)
     __sigemptyset (&ss->pending);
 
-  __pthread_spin_unlock (&ss->lock);
+  pending = _hurd_sigstate_pending (ss) & ~ss->blocked;
+  _hurd_sigstate_unlock (ss);
+  
+  if (! err && pending)
+    /* Send a message to the signal thread so it
+       will wake up and check for pending signals.  */
+    __msg_sig_post (_hurd_msgport, 0, 0, __mach_task_self ());
 
   return err;
 }
-- 
1.9.0


From 9b364debeebf32cd97fd619ff77334f089816aa8 Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Sun, 30 Mar 2014 22:43:07 +0000
Subject: [PATCH 6/6] Defines missing macro

---
 sysdeps/mach/bits/spin-lock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysdeps/mach/bits/spin-lock.h b/sysdeps/mach/bits/spin-lock.h
index 537dac9..4f2ae4c 100644
--- a/sysdeps/mach/bits/spin-lock.h
+++ b/sysdeps/mach/bits/spin-lock.h
@@ -30,7 +30,7 @@ typedef __spin_lock_t __pthread_spinlock_t;
 
 /* Initializer for a spin lock object.  */
 #ifndef __PTHREAD_SPIN_LOCK_INITIALIZER
-#error __PTHREAD_SPIN_LOCK_INITIALIZER undefined: should be defined by <lock-intern.h>.
+#define __PTHREAD_SPIN_LOCK_INITIALIZER ((__pthread_spinlock_t) 0)
 #endif
 
 __END_DECLS
-- 
1.9.0


debug log:

solving c37eb0a ...
found c37eb0a in https://yhetil.org/guix-devel/CAFtzXzMo79WcNxx62jU8=sz3rs8feOJ8cG3YZ_aV7Y4--+0vGw@mail.gmail.com/
found 0ba23f0 in https://yhetil.org/guix-devel/CAFtzXzMo79WcNxx62jU8=sz3rs8feOJ8cG3YZ_aV7Y4--+0vGw@mail.gmail.com/
found dd7d928 in https://yhetil.org/guix-devel/CAFtzXzMo79WcNxx62jU8=sz3rs8feOJ8cG3YZ_aV7Y4--+0vGw@mail.gmail.com/
found d83ac37 in https://yhetil.org/guix-devel/CAFtzXzMo79WcNxx62jU8=sz3rs8feOJ8cG3YZ_aV7Y4--+0vGw@mail.gmail.com/

applying [1/4] https://yhetil.org/guix-devel/CAFtzXzMo79WcNxx62jU8=sz3rs8feOJ8cG3YZ_aV7Y4--+0vGw@mail.gmail.com/
diff --git a/gnu/packages/patches/libpthread-0.3-3b391d-glibc-preparation.patch b/gnu/packages/patches/libpthread-0.3-3b391d-glibc-preparation.patch
new file mode 100644
index 0000000..d83ac37


applying [2/4] https://yhetil.org/guix-devel/CAFtzXzMo79WcNxx62jU8=sz3rs8feOJ8cG3YZ_aV7Y4--+0vGw@mail.gmail.com/
diff --git a/gnu/packages/patches/libpthread-0.3-3b391d-glibc-preparation.patch b/gnu/packages/patches/libpthread-0.3-3b391d-glibc-preparation.patch
index d83ac37..dd7d928 100644


applying [3/4] https://yhetil.org/guix-devel/CAFtzXzMo79WcNxx62jU8=sz3rs8feOJ8cG3YZ_aV7Y4--+0vGw@mail.gmail.com/
diff --git a/gnu/packages/patches/libpthread-0.3-3b391d-glibc-preparation.patch b/gnu/packages/patches/libpthread-0.3-3b391d-glibc-preparation.patch
index dd7d928..0ba23f0 100644


applying [4/4] https://yhetil.org/guix-devel/CAFtzXzMo79WcNxx62jU8=sz3rs8feOJ8cG3YZ_aV7Y4--+0vGw@mail.gmail.com/
diff --git a/gnu/packages/patches/libpthread-0.3-3b391d-glibc-preparation.patch b/gnu/packages/patches/libpthread-0.3-3b391d-glibc-preparation.patch
index 0ba23f0..c37eb0a 100644

4:26: trailing whitespace.
-- 
Checking patch gnu/packages/patches/libpthread-0.3-3b391d-glibc-preparation.patch...
4:28: new blank line at EOF.
+
Applied patch gnu/packages/patches/libpthread-0.3-3b391d-glibc-preparation.patch cleanly.
3:62: trailing whitespace.
 
3:67: trailing whitespace.
 
3:70: trailing whitespace.
-- 
Checking patch gnu/packages/patches/libpthread-0.3-3b391d-glibc-preparation.patch...
Applied patch gnu/packages/patches/libpthread-0.3-3b391d-glibc-preparation.patch cleanly.
Checking patch gnu/packages/patches/libpthread-0.3-3b391d-glibc-preparation.patch...
Applied patch gnu/packages/patches/libpthread-0.3-3b391d-glibc-preparation.patch cleanly.
Checking patch gnu/packages/patches/libpthread-0.3-3b391d-glibc-preparation.patch...
Applied patch gnu/packages/patches/libpthread-0.3-3b391d-glibc-preparation.patch cleanly.
warning: squelched 37 whitespace errors
warning: 42 lines add whitespace errors.

index at:
100644 c37eb0a526100431353043e80e9857e7542e328c	gnu/packages/patches/libpthread-0.3-3b391d-glibc-preparation.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).