libc: rename special-purpose pthread creation functions

The functions are used by our VirtualBox ports to hook into thread
creation and, thus, are listed in the ABI symbols.

Issue #4031
This commit is contained in:
Christian Helmuth
2021-03-09 14:24:14 +01:00
parent 0f9cb72cfa
commit 0ac4d1d411
9 changed files with 70 additions and 52 deletions

View File

@@ -456,7 +456,7 @@ struct Usb_ep : Genode::Entrypoint
void _handle_pthread_registration()
{
Genode::Thread *myself = Genode::Thread::myself();
if (!myself || Libc::pthread_create(&_pthread, *myself, &myself)) {
if (!myself || Libc::pthread_create_from_thread(&_pthread, *myself, &myself)) {
Genode::error("USB passthough will not work - thread for "
"pthread registration invalid");
}

View File

@@ -793,8 +793,8 @@ bool create_emt_vcpu(pthread_t * thread, ::size_t stack_size,
vcpu_handler_list().insert(vcpu_handler);
Libc::pthread_create(thread, start_routine, arg,
stack_size, name, cpu_connection, location);
Libc::pthread_create_from_session(thread, start_routine, arg,
stack_size, name, cpu_connection, location);
return true;
}

View File

@@ -186,7 +186,7 @@ class Nic_client
void _handle_pthread_registration()
{
Genode::Thread *myself = Genode::Thread::myself();
if (!myself || Libc::pthread_create(&_pthread, *myself, &myself)) {
if (!myself || Libc::pthread_create_from_thread(&_pthread, *myself, &myself)) {
Genode::error("network will not work - thread for pthread "
"registration invalid");
return;

View File

@@ -127,9 +127,9 @@ static int create_thread(pthread_t *thread, const pthread_attr_t *attr,
bool const rtthread_timer = rtthread->enmType == RTTHREADTYPE_TIMER;
if (rtthread_timer) {
return Libc::pthread_create(thread, start_routine, arg,
stack_size, rtthread->szName, nullptr,
Genode::Affinity::Location());
return Libc::pthread_create_from_session(thread, start_routine, arg,
stack_size, rtthread->szName, nullptr,
Genode::Affinity::Location());
} else {
using namespace Genode;
@@ -137,9 +137,9 @@ static int create_thread(pthread_t *thread, const pthread_attr_t *attr,
return cpu->retry_with_upgrade(Ram_quota{8*1024}, Cap_quota{2},
[&] ()
{
return Libc::pthread_create(thread, start_routine, arg,
stack_size, rtthread->szName, cpu,
Genode::Affinity::Location());
return Libc::pthread_create_from_session(thread, start_routine, arg,
stack_size, rtthread->szName, cpu,
Genode::Affinity::Location());
});
}

View File

@@ -438,7 +438,7 @@ struct Usb_ep : Genode::Entrypoint
void _handle_pthread_registration()
{
Genode::Thread *myself = Genode::Thread::myself();
if (!myself || Libc::pthread_create(&_pthread, *myself, &myself)) {
if (!myself || Libc::pthread_create_from_thread(&_pthread, *myself, &myself)) {
Genode::error("USB passthough will not work - thread for "
"pthread registration invalid");
}

View File

@@ -201,7 +201,7 @@ class Nic_client
void _handle_pthread_registration()
{
Genode::Thread *myself = Genode::Thread::myself();
if (!myself || Libc::pthread_create(&_pthread, *myself, &myself)) {
if (!myself || Libc::pthread_create_from_thread(&_pthread, *myself, &myself)) {
Genode::error("network will not work - thread for pthread "
"registration invalid");
return;