genode/repos/libports/src/lib/lwip/include/thread.h
Norman Feske ca971bbfd8 Move repositories to 'repos/' subdirectory
This patch changes the top-level directory layout as a preparatory
step for improving the tools for managing 3rd-party source codes.
The rationale is described in the issue referenced below.

Issue #1082
2014-05-14 16:08:00 +02:00

44 lines
824 B
C++

/*
* \brief Thread implementation for LwIP threads.
* \author Stefan Kalkowski
* \date 2009-11-14
*/
/*
* 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 __LWIP__INCLUDE__THREAD_H__
#define __LWIP__INCLUDE__THREAD_H__
#include <base/thread.h>
extern "C" {
#include <lwip/sys.h>
}
namespace Lwip {
class Lwip_thread : public Genode::Thread<16384>
{
private:
void (*_thread)(void *arg);
void *_arg;
public:
Lwip_thread(const char *name,
void (* thread)(void *arg),
void *arg)
: Genode::Thread<16384>(name), _thread(thread), _arg(arg) { }
void entry() { _thread(_arg); }
};
}
#endif //__LWIP__INCLUDE__THREAD_H__