genode/repos/libports/src/lib/lwip/include/thread.h

44 lines
824 B
C
Raw Normal View History

2011-12-22 16:19:25 +01:00
/*
* \brief Thread implementation for LwIP threads.
* \author Stefan Kalkowski
* \date 2009-11-14
*/
/*
2013-01-10 21:44:47 +01:00
* Copyright (C) 2009-2013 Genode Labs GmbH
2011-12-22 16:19:25 +01:00
*
* 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__