Skip to content

Commit 02612d3

Browse files
committed
Modify section order of pthread API
1 parent 0233065 commit 02612d3

File tree

15 files changed

+773
-595
lines changed

15 files changed

+773
-595
lines changed

kos/include/libc/local/stdlib/vsetproctitle.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* HASH CRC-32:0xb33df8f6 */
1+
/* HASH CRC-32:0xd812d85 */
22
/* Copyright (c) 2019-2025 Griefer@Work *
33
* *
44
* This software is provided 'as-is', without any express or implied *
@@ -78,19 +78,19 @@ __NAMESPACE_LOCAL_END
7878
#include <bits/types.h>
7979
#include <bits/crt/pthreadtypes.h>
8080
__NAMESPACE_LOCAL_BEGIN
81-
__CREDIRECT(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,__localdep_pthread_setname_np,(__pthread_t __self, const char *__name),pthread_setname_np,(__self,__name))
81+
__CREDIRECT(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,__localdep_pthread_setname_np,(__pthread_t __self, char const *__name),pthread_setname_np,(__self,__name))
8282
#elif defined(__CRT_HAVE_pthread_set_name_np)
8383
__NAMESPACE_LOCAL_END
8484
#include <bits/types.h>
8585
#include <bits/crt/pthreadtypes.h>
8686
__NAMESPACE_LOCAL_BEGIN
87-
__CREDIRECT(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,__localdep_pthread_setname_np,(__pthread_t __self, const char *__name),pthread_set_name_np,(__self,__name))
87+
__CREDIRECT(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,__localdep_pthread_setname_np,(__pthread_t __self, char const *__name),pthread_set_name_np,(__self,__name))
8888
#elif defined(__CRT_HAVE_cthread_set_name)
8989
__NAMESPACE_LOCAL_END
9090
#include <bits/types.h>
9191
#include <bits/crt/pthreadtypes.h>
9292
__NAMESPACE_LOCAL_BEGIN
93-
__CREDIRECT(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,__localdep_pthread_setname_np,(__pthread_t __self, const char *__name),cthread_set_name,(__self,__name))
93+
__CREDIRECT(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,__localdep_pthread_setname_np,(__pthread_t __self, char const *__name),cthread_set_name,(__self,__name))
9494
#else /* ... */
9595
#undef __local___localdep_pthread_setname_np_defined
9696
#endif /* !... */

kos/include/pthread.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* HASH CRC-32:0x2172b8ec */
1+
/* HASH CRC-32:0xb852f287 */
22
/* Copyright (c) 2019-2025 Griefer@Work *
33
* *
44
* This software is provided 'as-is', without any express or implied *
@@ -1240,19 +1240,19 @@ __CREDIRECT(__ATTR_OUTS(2, 3),__errno_t,__NOTHROW_NCX,pthread_getname_np,(pthrea
12401240
* Set thread name visible in the kernel and its interfaces
12411241
* @return: EOK: Success
12421242
* @return: ERANGE: The given `name' is too long */
1243-
__CDECLARE(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,pthread_setname_np,(pthread_t __self, const char *__name),(__self,__name))
1243+
__CDECLARE(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,pthread_setname_np,(pthread_t __self, char const *__name),(__self,__name))
12441244
#elif defined(__CRT_HAVE_pthread_set_name_np)
12451245
/* >> pthread_setname_np(3)
12461246
* Set thread name visible in the kernel and its interfaces
12471247
* @return: EOK: Success
12481248
* @return: ERANGE: The given `name' is too long */
1249-
__CREDIRECT(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,pthread_setname_np,(pthread_t __self, const char *__name),pthread_set_name_np,(__self,__name))
1249+
__CREDIRECT(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,pthread_setname_np,(pthread_t __self, char const *__name),pthread_set_name_np,(__self,__name))
12501250
#elif defined(__CRT_HAVE_cthread_set_name)
12511251
/* >> pthread_setname_np(3)
12521252
* Set thread name visible in the kernel and its interfaces
12531253
* @return: EOK: Success
12541254
* @return: ERANGE: The given `name' is too long */
1255-
__CREDIRECT(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,pthread_setname_np,(pthread_t __self, const char *__name),cthread_set_name,(__self,__name))
1255+
__CREDIRECT(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,pthread_setname_np,(pthread_t __self, char const *__name),cthread_set_name,(__self,__name))
12561256
#else /* ... */
12571257
#undef __pthread_setname_np_defined
12581258
#endif /* !... */

kos/include/pthread_np.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* HASH CRC-32:0xd3b859ff */
1+
/* HASH CRC-32:0x8538ccf9 */
22
/* Copyright (c) 2019-2025 Griefer@Work *
33
* *
44
* This software is provided 'as-is', without any express or implied *
@@ -130,19 +130,19 @@ __CREDIRECT(__ATTR_OUTS(2, 3),__errno_t,__NOTHROW_NCX,pthread_getname_np,(pthrea
130130
* Set thread name visible in the kernel and its interfaces
131131
* @return: EOK: Success
132132
* @return: ERANGE: The given `name' is too long */
133-
__CREDIRECT(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,pthread_set_name_np,(pthread_t __self, const char *__name),pthread_setname_np,(__self,__name))
133+
__CREDIRECT(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,pthread_set_name_np,(pthread_t __self, char const *__name),pthread_setname_np,(__self,__name))
134134
#elif defined(__CRT_HAVE_pthread_set_name_np)
135135
/* >> pthread_setname_np(3)
136136
* Set thread name visible in the kernel and its interfaces
137137
* @return: EOK: Success
138138
* @return: ERANGE: The given `name' is too long */
139-
__CDECLARE(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,pthread_set_name_np,(pthread_t __self, const char *__name),(__self,__name))
139+
__CDECLARE(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,pthread_set_name_np,(pthread_t __self, char const *__name),(__self,__name))
140140
#elif defined(__CRT_HAVE_cthread_set_name)
141141
/* >> pthread_setname_np(3)
142142
* Set thread name visible in the kernel and its interfaces
143143
* @return: EOK: Success
144144
* @return: ERANGE: The given `name' is too long */
145-
__CREDIRECT(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,pthread_set_name_np,(pthread_t __self, const char *__name),cthread_set_name,(__self,__name))
145+
__CREDIRECT(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,pthread_set_name_np,(pthread_t __self, char const *__name),cthread_set_name,(__self,__name))
146146
#endif /* ... */
147147
#ifndef __pthread_setname_np_defined
148148
#define __pthread_setname_np_defined
@@ -151,19 +151,19 @@ __CREDIRECT(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,pthread_set_name_np,(pthread_t
151151
* Set thread name visible in the kernel and its interfaces
152152
* @return: EOK: Success
153153
* @return: ERANGE: The given `name' is too long */
154-
__CDECLARE(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,pthread_setname_np,(pthread_t __self, const char *__name),(__self,__name))
154+
__CDECLARE(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,pthread_setname_np,(pthread_t __self, char const *__name),(__self,__name))
155155
#elif defined(__CRT_HAVE_pthread_set_name_np)
156156
/* >> pthread_setname_np(3)
157157
* Set thread name visible in the kernel and its interfaces
158158
* @return: EOK: Success
159159
* @return: ERANGE: The given `name' is too long */
160-
__CREDIRECT(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,pthread_setname_np,(pthread_t __self, const char *__name),pthread_set_name_np,(__self,__name))
160+
__CREDIRECT(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,pthread_setname_np,(pthread_t __self, char const *__name),pthread_set_name_np,(__self,__name))
161161
#elif defined(__CRT_HAVE_cthread_set_name)
162162
/* >> pthread_setname_np(3)
163163
* Set thread name visible in the kernel and its interfaces
164164
* @return: EOK: Success
165165
* @return: ERANGE: The given `name' is too long */
166-
__CREDIRECT(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,pthread_setname_np,(pthread_t __self, const char *__name),cthread_set_name,(__self,__name))
166+
__CREDIRECT(__ATTR_IN(2),__errno_t,__NOTHROW_NCX,pthread_setname_np,(pthread_t __self, char const *__name),cthread_set_name,(__self,__name))
167167
#else /* ... */
168168
#undef __pthread_setname_np_defined
169169
#endif /* !... */

kos/misc/magicgenerator/generate_headers.dee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -910,8 +910,8 @@ function doPrint_src_libc_crtOrder() {
910910
}
911911
/* Resolve wildcard rules. */
912912
wildcardRules.sort(key: x -> {
913-
x.pattern.length, /* Sort by length first... */
914-
x.pattern, /* ... and then alphabetically */
913+
-x.pattern.length, /* Sort by "length DESC" first... */
914+
x.pattern, /* ... and then alphabetically */
915915
});
916916
for (local rule: wildcardRules) {
917917
local sections: {string...} = [];

kos/src/libc/auto/pthread.c

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* HASH CRC-32:0xf216ada9 */
1+
/* HASH CRC-32:0xb9c36ef4 */
22
/* Copyright (c) 2019-2025 Griefer@Work *
33
* *
44
* This software is provided 'as-is', without any express or implied *
@@ -37,7 +37,7 @@ DECL_BEGIN
3737
* Compare two thread identifiers
3838
* @return: 0 : Given threads are non-equal
3939
* @return: * : Given threads are equal */
40-
INTERN ATTR_SECTION(".text.crt.sched.pthread") ATTR_CONST WUNUSED int
40+
INTERN ATTR_SECTION(".text.crt.sched.pthread.core.thread") ATTR_CONST WUNUSED int
4141
NOTHROW(LIBCCALL libc_pthread_equal)(pthread_t thr1,
4242
pthread_t thr2) {
4343
return thr1 == thr2;
@@ -53,7 +53,7 @@ NOTHROW(LIBCCALL libc_pthread_equal)(pthread_t thr1,
5353
* same `once_control' argument. `once_control' must point to a static or
5454
* extern variable initialized to `PTHREAD_ONCE_INIT'.
5555
* @return: EOK: Success */
56-
INTERN ATTR_SECTION(".text.crt.sched.pthread") ATTR_INOUT(1) NONNULL((2)) errno_t
56+
INTERN ATTR_SECTION(".text.crt.sched.pthread.core.once") ATTR_INOUT(1) NONNULL((2)) errno_t
5757
NOTHROW_CB(LIBCCALL libc_pthread_once)(pthread_once_t *once_control,
5858
void (LIBCCALL *init_routine)(void)) {
5959
#undef __PRIVATE_PTHREAD_ONCE_USES_FUTEX
@@ -180,7 +180,7 @@ NOTHROW_CB(LIBCCALL libc_pthread_once)(pthread_once_t *once_control,
180180
/* Function called to call the cleanup handler. As an extern inline
181181
* function the compiler is free to decide inlining the change when
182182
* needed or fall back on the copy which must exist somewhere else */
183-
INTERN ATTR_SECTION(".text.crt.sched.pthread") ATTR_INOUT(1) void
183+
INTERN ATTR_SECTION(".text.crt.sched.pthread.ext.gnu.cleanup") ATTR_INOUT(1) void
184184
NOTHROW_NCX(LIBCCALL libc___pthread_cleanup_routine)(struct __pthread_cleanup_frame *frame) {
185185
if (frame->__do_it)
186186
(*frame->__cancel_routine)(frame->__cancel_arg);
@@ -190,7 +190,7 @@ NOTHROW_NCX(LIBCCALL libc___pthread_cleanup_routine)(struct __pthread_cleanup_fr
190190
* Initialize the spinlock `self'. If `pshared' is nonzero
191191
* the spinlock can be shared between different processes
192192
* @return: EOK: Success */
193-
INTERN ATTR_SECTION(".text.crt.sched.pthread") ATTR_OUT(1) errno_t
193+
INTERN ATTR_SECTION(".text.crt.sched.pthread.core.spin") ATTR_OUT(1) errno_t
194194
NOTHROW_NCX(LIBCCALL libc_pthread_spin_init)(pthread_spinlock_t *self,
195195
int pshared) {
196196
(void)pshared;
@@ -200,7 +200,7 @@ NOTHROW_NCX(LIBCCALL libc_pthread_spin_init)(pthread_spinlock_t *self,
200200
/* >> pthread_spin_destroy(3)
201201
* Destroy the spinlock `self'
202202
* @return: EOK: Success */
203-
INTERN ATTR_SECTION(".text.crt.sched.pthread") ATTR_INOUT(1) errno_t
203+
INTERN ATTR_SECTION(".text.crt.sched.pthread.core.spin") ATTR_INOUT(1) errno_t
204204
NOTHROW_NCX(LIBCCALL libc_pthread_spin_destroy)(pthread_spinlock_t *self) {
205205
COMPILER_IMPURE();
206206
(void)self; /* no-op */
@@ -211,7 +211,7 @@ NOTHROW_NCX(LIBCCALL libc_pthread_spin_destroy)(pthread_spinlock_t *self) {
211211
/* >> pthread_spin_lock(3)
212212
* Wait until spinlock `self' is retrieved
213213
* @return: EOK: Success */
214-
INTERN ATTR_SECTION(".text.crt.sched.pthread") ATTR_INOUT(1) errno_t
214+
INTERN ATTR_SECTION(".text.crt.sched.pthread.core.spin") ATTR_INOUT(1) errno_t
215215
NOTHROW_NCX(LIBCCALL libc_pthread_spin_lock)(pthread_spinlock_t *self) {
216216
while (libc_pthread_spin_trylock(self) != 0)
217217
__hybrid_yield();
@@ -223,7 +223,7 @@ NOTHROW_NCX(LIBCCALL libc_pthread_spin_lock)(pthread_spinlock_t *self) {
223223
* Try to lock spinlock `self'
224224
* @return: EOK: Success
225225
* @return: EBUSY: Lock has already been acquired */
226-
INTERN ATTR_SECTION(".text.crt.sched.pthread") WUNUSED ATTR_INOUT(1) errno_t
226+
INTERN ATTR_SECTION(".text.crt.sched.pthread.core.spin") WUNUSED ATTR_INOUT(1) errno_t
227227
NOTHROW_NCX(LIBCCALL libc_pthread_spin_trylock)(pthread_spinlock_t *self) {
228228
if (__hybrid_atomic_xch(self, 1, __ATOMIC_ACQUIRE) == 0)
229229
return 0;
@@ -241,7 +241,7 @@ NOTHROW_NCX(LIBCCALL libc_pthread_spin_trylock)(pthread_spinlock_t *self) {
241241
/* >> pthread_spin_unlock(3)
242242
* Release spinlock `self'
243243
* @return: EOK: Success */
244-
INTERN ATTR_SECTION(".text.crt.sched.pthread") ATTR_INOUT(1) errno_t
244+
INTERN ATTR_SECTION(".text.crt.sched.pthread.core.spin") ATTR_INOUT(1) errno_t
245245
NOTHROW_NCX(LIBCCALL libc_pthread_spin_unlock)(pthread_spinlock_t *self) {
246246
__hybrid_atomic_store(self, 0, __ATOMIC_RELEASE);
247247
return 0;
@@ -256,7 +256,7 @@ NOTHROW_NCX(LIBCCALL libc_pthread_spin_unlock)(pthread_spinlock_t *self) {
256256
* function will no longer block, but simply return immediately.
257257
* @return: EOK: Success
258258
* @return: ENOMEM: Insufficient memory to create the key */
259-
INTERN ATTR_SECTION(".text.crt.sched.pthread") ATTR_OUT(1) errno_t
259+
INTERN ATTR_SECTION(".text.crt.sched.pthread.core.tls") ATTR_OUT(1) errno_t
260260
NOTHROW_NCX(LIBCCALL libc_pthread_key_create_once_np)(pthread_key_t *key,
261261
void (LIBKCALL *destr_function)(void *)) {
262262
pthread_key_t kv;
@@ -301,7 +301,7 @@ NOTHROW_NCX(LIBCCALL libc_pthread_key_create_once_np)(pthread_key_t *key,
301301
#include <bits/os/cpu_set.h>
302302
/* >> pthread_num_processors_np(3)
303303
* @return: * : The number of cpus that the calling thread is able to run on */
304-
INTERN ATTR_SECTION(".text.crt.sched.pthread_ext") WUNUSED __STDC_INT_AS_SIZE_T
304+
INTERN ATTR_SECTION(".text.crt.sched.pthread.ext.misc.affinity") WUNUSED __STDC_INT_AS_SIZE_T
305305
NOTHROW_NCX(LIBCCALL libc_pthread_num_processors_np)(void) {
306306
cpu_set_t cset;
307307
if unlikely(libc_sched_getaffinity(0, sizeof(cset), &cset) != 0)
@@ -315,7 +315,7 @@ NOTHROW_NCX(LIBCCALL libc_pthread_num_processors_np)(void) {
315315
* @return: EOK: Success
316316
* @return: EINVAL: `n' was specified as less than `1'
317317
* @return: * : Same as `errno' after a call to `sched_setaffinity(2)' */
318-
INTERN ATTR_SECTION(".text.crt.sched.pthread_ext") errno_t
318+
INTERN ATTR_SECTION(".text.crt.sched.pthread.ext.misc.affinity") errno_t
319319
NOTHROW_NCX(LIBCCALL libc_pthread_set_num_processors_np)(int n) {
320320
int i, result;
321321
cpu_set_t cset;
@@ -342,7 +342,7 @@ NOTHROW_NCX(LIBCCALL libc_pthread_set_num_processors_np)(int n) {
342342
* calling program), and 0 otherwise. Additionally, -1 is returned
343343
* if the calling thread "hasn't been initialized", though this
344344
* isn't a case that can actually happen under KOS's implementation. */
345-
INTERN ATTR_SECTION(".text.crt.sched.pthread_ext") ATTR_CONST WUNUSED int
345+
INTERN ATTR_SECTION(".text.crt.sched.pthread.ext.tls_globals") ATTR_CONST WUNUSED int
346346
NOTHROW(LIBCCALL libc_pthread_main_np)(void) {
347347

348348
return libc_pthread_equal(libc_pthread_mainthread_np(), libc_pthread_self());
@@ -358,7 +358,7 @@ NOTHROW(LIBCCALL libc_pthread_main_np)(void) {
358358
* - `pthread_resume_all_np(3)'
359359
* Alias for `pthread_attr_setstartsuspended_np(self, 1)'
360360
* @return: EOK: Always returned */
361-
INTERN ATTR_SECTION(".text.crt.sched.pthread_ext") ATTR_INOUT(1) errno_t
361+
INTERN ATTR_SECTION(".text.crt.sched.pthread.ext.kos.suspend") ATTR_INOUT(1) errno_t
362362
NOTHROW_NCX(LIBCCALL libc_pthread_attr_setcreatesuspend_np)(pthread_attr_t *__restrict self) {
363363
return libc_pthread_attr_setstartsuspended_np(self, 1);
364364
}
@@ -375,7 +375,7 @@ NOTHROW_NCX(LIBCCALL libc_pthread_attr_setcreatesuspend_np)(pthread_attr_t *__re
375375
* @return: ESRCH: The thread has already been terminated
376376
* @return: ENOMEM: Insufficient memory
377377
* @return: EOVERFLOW: The suspension counter can't go any higher */
378-
INTERN ATTR_SECTION(".text.crt.sched.pthread_ext") errno_t
378+
INTERN ATTR_SECTION(".text.crt.sched.pthread.ext.kos.suspend") errno_t
379379
NOTHROW_NCX(LIBCCALL libc_pthread_suspend_np)(pthread_t self) {
380380
return libc_pthread_suspend2_np(self, NULL);
381381
}
@@ -388,7 +388,7 @@ NOTHROW_NCX(LIBCCALL libc_pthread_suspend_np)(pthread_t self) {
388388
* @see pthread_suspend_np, pthread_suspend2_np, pthread_resume2_np, pthread_continue_np
389389
* @return: EOK: Success
390390
* @return: ESRCH: The thread has already been terminated */
391-
INTERN ATTR_SECTION(".text.crt.sched.pthread_ext") errno_t
391+
INTERN ATTR_SECTION(".text.crt.sched.pthread.ext.kos.suspend") errno_t
392392
NOTHROW_NCX(LIBCCALL libc_pthread_resume_np)(pthread_t self) {
393393
return libc_pthread_resume2_np(self, NULL);
394394
}
@@ -398,7 +398,7 @@ NOTHROW_NCX(LIBCCALL libc_pthread_resume_np)(pthread_t self) {
398398
#include <libc/errno.h>
399399
/* >> pthread_getunique_np(3)
400400
* Wrapper around `pthread_gettid_np(3)' that is also available on some other platforms. */
401-
INTERN ATTR_SECTION(".text.crt.sched.pthread_ext") ATTR_PURE WUNUSED errno_t
401+
INTERN ATTR_SECTION(".text.crt.sched.pthread.ext.kos.tid") ATTR_PURE WUNUSED errno_t
402402
NOTHROW_NCX(LIBCCALL libc_pthread_getunique_np)(pthread_t self,
403403
pthread_id_np_t *ptid) {
404404
if unlikely((*ptid = crt_pthread_gettid_np(self)) == 0) {
@@ -410,7 +410,7 @@ NOTHROW_NCX(LIBCCALL libc_pthread_getunique_np)(pthread_t self,
410410
}
411411
return EOK;
412412
}
413-
INTERN ATTR_SECTION(".text.crt.sched.pthread_ext") WUNUSED NONNULL((1)) errno_t
413+
INTERN ATTR_SECTION(".text.crt.sched.pthread.ext.misc") WUNUSED NONNULL((1)) errno_t
414414
NOTHROW_NCX(LIBCCALL libc_pthread_switch_add_np)(pthread_switch_routine_t routine) {
415415
/* This right here also matches what FreeBSD current does (that is: returning "ENOTSUP") */
416416
COMPILER_IMPURE();
@@ -425,12 +425,12 @@ NOTHROW_NCX(LIBCCALL libc_pthread_switch_add_np)(pthread_switch_routine_t routin
425425
}
426426
DEFINE_INTERN_ALIAS_P(libc_pthread_switch_delete_np,libc_pthread_switch_add_np,WUNUSED NONNULL((1)),errno_t,NOTHROW_NCX,LIBCCALL,(pthread_switch_routine_t routine),(routine));
427427
#include <sys/single_threaded.h>
428-
INTERN ATTR_SECTION(".text.crt.sched.pthread_ext") int
428+
INTERN ATTR_SECTION(".text.crt.sched.pthread.ext.misc") int
429429
NOTHROW_NCX(LIBCCALL libc_pthread_is_threaded_np)(void) {
430430
return !__libc_single_threaded;
431431
}
432432
#include <bits/crt/pthreadtypes.h>
433-
INTERN ATTR_SECTION(".text.crt.sched.pthread_ext") size_t
433+
INTERN ATTR_SECTION(".text.crt.sched.pthread.ext.misc") size_t
434434
NOTHROW_NCX(LIBCCALL libc_pthread_get_stacksize_np)(pthread_t self) {
435435
size_t result = 0;
436436
pthread_attr_t attr;
@@ -444,7 +444,7 @@ NOTHROW_NCX(LIBCCALL libc_pthread_get_stacksize_np)(pthread_t self) {
444444
return result;
445445
}
446446
#include <bits/crt/pthreadtypes.h>
447-
INTERN ATTR_SECTION(".text.crt.sched.pthread_ext") void *
447+
INTERN ATTR_SECTION(".text.crt.sched.pthread.ext.misc") void *
448448
NOTHROW_NCX(LIBCCALL libc_pthread_get_stackaddr_np)(pthread_t self) {
449449
void *result = NULL;
450450
pthread_attr_t attr;

kos/src/libc/auto/pthread.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* HASH CRC-32:0x39a0d5b3 */
1+
/* HASH CRC-32:0x5dac0628 */
22
/* Copyright (c) 2019-2025 Griefer@Work *
33
* *
44
* This software is provided 'as-is', without any express or implied *
@@ -262,7 +262,7 @@ INTDEF ATTR_OUTS(2, 3) errno_t NOTHROW_NCX(LIBDCALL libd_pthread_getname_np)(pth
262262
* Set thread name visible in the kernel and its interfaces
263263
* @return: EOK: Success
264264
* @return: ERANGE: The given `name' is too long */
265-
INTDEF ATTR_IN(2) errno_t NOTHROW_NCX(LIBDCALL libd_pthread_setname_np)(pthread_t self, const char *name);
265+
INTDEF ATTR_IN(2) errno_t NOTHROW_NCX(LIBDCALL libd_pthread_setname_np)(pthread_t self, char const *name);
266266
/* >> pthread_gettid_np(3)
267267
* Return the TID of the given `self'.
268268
* If `self' has already terminated, 0 is returned

0 commit comments

Comments
 (0)