wok-next view gcc/stuff/patches/libgnarl-musl.patch @ rev 21223

updated btrfs-progs again (4.9.1 -> 5.3.1)
author Hans-G?nter Theisgen
date Tue Dec 03 10:21:27 2019 +0100 (2019-12-03)
parents
children
line source
1 diff -rup gcc-8.2.0/gcc/ada/libgnarl/s-osinte__linux.ads gcc-8.2.0-new/gcc/ada/libgnarl/s-osinte__linux.ads
2 --- gcc-8.2.0/gcc/ada/libgnarl/s-osinte__linux.ads 2018-01-11 00:55:25.000000000 -0800
3 +++ gcc-8.2.0-new/gcc/ada/libgnarl/s-osinte__linux.ads 2018-11-01 16:16:23.372452951 -0700
4 @@ -394,12 +394,6 @@ package System.OS_Interface is
5 PTHREAD_RWLOCK_PREFER_WRITER_NP : constant := 1;
6 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP : constant := 2;
8 - function pthread_rwlockattr_setkind_np
9 - (attr : access pthread_rwlockattr_t;
10 - pref : int) return int;
11 - pragma Import
12 - (C, pthread_rwlockattr_setkind_np, "pthread_rwlockattr_setkind_np");
13 -
14 function pthread_rwlock_init
15 (mutex : access pthread_rwlock_t;
16 attr : access pthread_rwlockattr_t) return int;
17 @@ -464,11 +458,6 @@ package System.OS_Interface is
18 protocol : int) return int;
19 pragma Import (C, pthread_mutexattr_setprotocol);
21 - function pthread_mutexattr_setprioceiling
22 - (attr : access pthread_mutexattr_t;
23 - prioceiling : int) return int;
24 - pragma Import (C, pthread_mutexattr_setprioceiling);
25 -
26 type struct_sched_param is record
27 sched_priority : int; -- scheduling priority
28 end record;
29 diff -rup gcc-8.2.0/gcc/ada/libgnarl/s-taprop__linux.adb gcc-8.2.0-new/gcc/ada/libgnarl/s-taprop__linux.adb
30 --- gcc-8.2.0/gcc/ada/libgnarl/s-taprop__linux.adb 2018-01-11 00:55:25.000000000 -0800
31 +++ gcc-8.2.0-new/gcc/ada/libgnarl/s-taprop__linux.adb 2018-11-13 11:28:36.433964449 -0800
32 @@ -202,9 +202,6 @@ package body System.Task_Primitives.Oper
33 pragma Import
34 (C, GNAT_pthread_condattr_setup, "__gnat_pthread_condattr_setup");
36 - function GNAT_has_cap_sys_nice return C.int;
37 - pragma Import
38 - (C, GNAT_has_cap_sys_nice, "__gnat_has_cap_sys_nice");
39 -- We do not have pragma Linker_Options ("-lcap"); here, because this
40 -- library is not present on many Linux systems. 'libcap' is the Linux
41 -- "capabilities" library, called by __gnat_has_cap_sys_nice.
42 @@ -214,38 +211,6 @@ package body System.Task_Primitives.Oper
43 -- Convert Ada priority to Linux priority. Priorities are 1 .. 99 on
44 -- GNU/Linux, so we map 0 .. 98 to 1 .. 99.
46 - function Get_Ceiling_Support return Boolean;
47 - -- Get the value of the Ceiling_Support constant (see below).
48 - -- Note well: If this function or related code is modified, it should be
49 - -- tested by hand, because automated testing doesn't exercise it.
50 -
51 - -------------------------
52 - -- Get_Ceiling_Support --
53 - -------------------------
54 -
55 - function Get_Ceiling_Support return Boolean is
56 - Ceiling_Support : Boolean := False;
57 - begin
58 - if Locking_Policy /= 'C' then
59 - return False;
60 - end if;
61 -
62 - declare
63 - function geteuid return Integer;
64 - pragma Import (C, geteuid, "geteuid");
65 - Superuser : constant Boolean := geteuid = 0;
66 - Has_Cap : constant C.int := GNAT_has_cap_sys_nice;
67 - pragma Assert (Has_Cap in 0 | 1);
68 - begin
69 - Ceiling_Support := Superuser or else Has_Cap = 1;
70 - end;
71 -
72 - return Ceiling_Support;
73 - end Get_Ceiling_Support;
74 -
75 - pragma Warnings (Off, "non-static call not allowed in preelaborated unit");
76 - Ceiling_Support : constant Boolean := Get_Ceiling_Support;
77 - pragma Warnings (On, "non-static call not allowed in preelaborated unit");
78 -- True if the locking policy is Ceiling_Locking, and the current process
79 -- has permission to use this policy. The process has permission if it is
80 -- running as 'root', or if the capability was set by the setcap command,
81 @@ -348,7 +313,9 @@ package body System.Task_Primitives.Oper
82 -- Init_Mutex --
83 ----------------
85 + pragma Warnings (Off, "formal parameter * is not referenced");
86 function Init_Mutex (L : RTS_Lock_Ptr; Prio : Any_Priority) return C.int is
87 + pragma Warnings (On, "formal parameter * is not referenced");
88 Mutex_Attr : aliased pthread_mutexattr_t;
89 Result, Result_2 : C.int;
91 @@ -360,16 +327,7 @@ package body System.Task_Primitives.Oper
92 return Result;
93 end if;
95 - if Ceiling_Support then
96 - Result := pthread_mutexattr_setprotocol
97 - (Mutex_Attr'Access, PTHREAD_PRIO_PROTECT);
98 - pragma Assert (Result = 0);
99 -
100 - Result := pthread_mutexattr_setprioceiling
101 - (Mutex_Attr'Access, Prio_To_Linux_Prio (Prio));
102 - pragma Assert (Result = 0);
103 -
104 - elsif Locking_Policy = 'I' then
105 + if Locking_Policy = 'I' then
106 Result := pthread_mutexattr_setprotocol
107 (Mutex_Attr'Access, PTHREAD_PRIO_INHERIT);
108 pragma Assert (Result = 0);
109 @@ -409,11 +367,6 @@ package body System.Task_Primitives.Oper
110 Result := pthread_rwlockattr_init (RWlock_Attr'Access);
111 pragma Assert (Result = 0);
113 - Result := pthread_rwlockattr_setkind_np
114 - (RWlock_Attr'Access,
115 - PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP);
116 - pragma Assert (Result = 0);
117 -
118 Result := pthread_rwlock_init (L.RW'Access, RWlock_Attr'Access);
120 pragma Assert (Result in 0 | ENOMEM);