648bcd1505
This patch unifies the patterns of using the 'Genode' and 'Libc' namespaces. Types defined in the 'internal/' headers reside in the 'Libc' namespace. The code in the headers does not need to use the 'Libc::' prefix. Compilation units import the 'Libc' namespace after the definition of local types. Local types reside in the 'Libc' namespace (and should eventually move to an 'internal/' header). Since the 'Libc' namespace imports the 'Genode' namespace, there is no need to use the 'Genode::' prefix. Consequently, code in the compilation units rarely need to qualify the 'Genode' or 'Libc' namespaces. There are a few cases where the 'Libc', the 'Genode', and the global (libc) namespaces are ambigious. In these cases, an explicit clarification is needed: - 'Genode::Allocator' differs from 'Libc::Allocator'. - 'Genode::Env' differs from 'Libc::Env'. - Genode's string functions (strcmp, memcpy, strcpy) conflict with the names of the (global) libc functions. - There exist both 'Genode::uint64_t' and the libc'c 'uint64_t'. Issue #3497
39 lines
969 B
C++
39 lines
969 B
C++
/*
|
|
* \brief Create custom pthreads with native CPU sessions and affinities
|
|
* \author Emery Hemingway
|
|
* \date 2018-11-22
|
|
*
|
|
* The Libc::pthread_create symbol is exported for the sake of Vbox
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2018 Genode Labs GmbH
|
|
*
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
* under the terms of the GNU Affero General Public License version 3.
|
|
*/
|
|
|
|
#ifndef _LIBC__INTERNAL__THREAD_CREATE_H_
|
|
#define _LIBC__INTERNAL__THREAD_CREATE_H_
|
|
|
|
/* Genode includes */
|
|
#include <base/thread.h>
|
|
|
|
/* libc includes */
|
|
#include <pthread.h>
|
|
|
|
/* libc-internal includes */
|
|
#include <internal/types.h>
|
|
|
|
namespace Libc {
|
|
|
|
int pthread_create(pthread_t *thread,
|
|
void *(*start_routine) (void *), void *arg,
|
|
size_t stack_size, char const * name,
|
|
Cpu_session * cpu, Affinity::Location location);
|
|
|
|
int pthread_create(pthread_t *, Thread &);
|
|
}
|
|
|
|
#endif /* _LIBC__INTERNAL__THREAD_CREATE_H_ */
|