genode/base-pistachio/src/platform/_main_helper.h
Christian Prochaska a99193ad90 Rework the internal lock interface
With this patch, the 'futex' syscall gets used for blocking and unblocking
of threads in the Linux-specific lock implementation.

The 'Native_thread_id' type, which was previously used in the
lock-internal 'Applicant' class to identify a thread to be woken up,
was not suitable anymore for implementing this change. With this patch,
the 'Thread_base*' type gets used instead, which also has the positive
effect of making the public 'cancelable_lock.h' header file
platform-independent.

Fixes #646.
2013-02-25 22:14:21 +01:00

36 lines
689 B
C++

/*
* \brief Platform-specific helper functions for the _main() function
* \author Christian Prochaska
* \date 2009-08-05
*/
/*
* Copyright (C) 2009-2013 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#ifndef _PLATFORM___MAIN_HELPER_H_
#define _PLATFORM___MAIN_HELPER_H_
/* Pistachio includes */
namespace Pistachio {
#include <l4/thread.h>
}
/* Genode includes */
#include <base/native_types.h>
Genode::Native_thread_id main_thread_tid;
static void main_thread_bootstrap()
{
main_thread_tid = Pistachio::L4_Myself();
}
#endif /* _PLATFORM___MAIN_HELPER_H_ */