1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00

sys: adapted to renamed THREAD FLAGS

This commit is contained in:
Hauke Petersen 2015-12-02 12:00:19 +01:00
parent 4216f9fef0
commit 41979b64cd
13 changed files with 21 additions and 16 deletions

View File

@ -228,7 +228,7 @@ thread::thread(F&& f, Args&&... args)
std::unique_ptr<func_and_args> p(
new func_and_args(m_data.get(), forward<F>(f), forward<Args>(args)...));
m_handle = thread_create(
m_data->stack, stack_size, THREAD_PRIORITY_MAIN - 1, 0, // CREATE_WOUT_YIELD
m_data->stack, stack_size, THREAD_PRIORITY_MAIN - 1, 0,
&thread_proxy<func_and_args>, p.get(), "riot_cpp_thread");
if (m_handle >= 0) {
p.release();

View File

@ -163,7 +163,7 @@ kernel_pid_t gnrc_zep_init(gnrc_zep_t *dev, uint16_t src_port, ipv6_addr_t *dst,
dev->lqi_mode = 1;
_pid = thread_create(_rx_stack, GNRC_ZEP_STACK_SIZE, GNRC_ZEP_PRIO,
CREATE_STACKTEST, _event_loop, dev, "zep_app");
THREAD_CREATE_STACKTEST, _event_loop, dev, "zep_app");
DEBUG("zep: started thread with PID %" PRIkernel_pid "\n", _pid);

View File

@ -186,7 +186,7 @@ kernel_pid_t gnrc_netdev2_init(char *stack, int stacksize, char priority,
}
/* create new gnrc_netdev2 thread */
res = thread_create(stack, stacksize, priority, CREATE_STACKTEST,
res = thread_create(stack, stacksize, priority, THREAD_CREATE_STACKTEST,
_gnrc_netdev2_thread, (void *)gnrc_netdev2, name);
if (res <= 0) {
return -EINVAL;

View File

@ -138,7 +138,7 @@ kernel_pid_t gnrc_nomac_init(char *stack, int stacksize, char priority,
return -ENODEV;
}
/* create new NOMAC thread */
res = thread_create(stack, stacksize, priority, CREATE_STACKTEST,
res = thread_create(stack, stacksize, priority, THREAD_CREATE_STACKTEST,
_nomac_thread, (void *)dev, name);
if (res <= 0) {
return -EINVAL;

View File

@ -268,7 +268,7 @@ kernel_pid_t gnrc_slip_init(gnrc_slip_dev_t *dev, uart_t uart, uint32_t baudrate
/* start SLIP thread */
DEBUG("slip: starting SLIP thread\n");
pid = thread_create(stack, stack_size, priority, CREATE_STACKTEST,
pid = thread_create(stack, stack_size, priority, THREAD_CREATE_STACKTEST,
_slip, dev, _SLIP_NAME);
if (pid < 0) {
DEBUG("slip: unable to create SLIP thread\n");

View File

@ -187,7 +187,8 @@ int gnrc_nettest_init(void)
{
if (_pid <= KERNEL_PID_UNDEF) {
_pid = thread_create(_stack, sizeof(_stack), GNRC_NETTEST_PRIO,
CREATE_STACKTEST, _event_loop, NULL, "nettest");
THREAD_CREATE_STACKTEST,
_event_loop, NULL, "nettest");
}
return _pid;

View File

@ -85,7 +85,8 @@ kernel_pid_t gnrc_ipv6_init(void)
{
if (gnrc_ipv6_pid == KERNEL_PID_UNDEF) {
gnrc_ipv6_pid = thread_create(_stack, sizeof(_stack), GNRC_IPV6_PRIO,
CREATE_STACKTEST, _event_loop, NULL, "ipv6");
THREAD_CREATE_STACKTEST,
_event_loop, NULL, "ipv6");
}
#ifdef MODULE_FIB

View File

@ -55,7 +55,7 @@ kernel_pid_t gnrc_sixlowpan_init(void)
}
_pid = thread_create(_stack, sizeof(_stack), GNRC_SIXLOWPAN_PRIO,
CREATE_STACKTEST, _event_loop, NULL, "6lo");
THREAD_CREATE_STACKTEST, _event_loop, NULL, "6lo");
return _pid;
}

View File

@ -164,7 +164,8 @@ kernel_pid_t gnrc_pktdump_init(void)
{
if (_pid == KERNEL_PID_UNDEF) {
_pid = thread_create(_stack, sizeof(_stack), GNRC_PKTDUMP_PRIO,
CREATE_STACKTEST, _eventloop, NULL, "pktdump");
THREAD_CREATE_STACKTEST,
_eventloop, NULL, "pktdump");
}
return _pid;
}

View File

@ -49,8 +49,9 @@ kernel_pid_t gnrc_rpl_init(kernel_pid_t if_pid)
if (gnrc_rpl_pid == KERNEL_PID_UNDEF) {
_instance_id = 0;
/* start the event loop */
gnrc_rpl_pid = thread_create(_stack, sizeof(_stack), GNRC_RPL_PRIO, CREATE_STACKTEST,
_event_loop, NULL, "RPL");
gnrc_rpl_pid = thread_create(_stack, sizeof(_stack), GNRC_RPL_PRIO,
THREAD_CREATE_STACKTEST,
_event_loop, NULL, "RPL");
if (gnrc_rpl_pid == KERNEL_PID_UNDEF) {
DEBUG("RPL: could not start the event loop\n");

View File

@ -277,7 +277,7 @@ int gnrc_udp_init(void)
if (_pid == KERNEL_PID_UNDEF) {
/* start UDP thread */
_pid = thread_create(_stack, sizeof(_stack), GNRC_UDP_PRIO,
CREATE_STACKTEST, _event_loop, NULL, "udp");
THREAD_CREATE_STACKTEST, _event_loop, NULL, "udp");
}
return _pid;
}

View File

@ -94,7 +94,7 @@ kernel_pid_t nhdp_start(void)
/* Start the NHDP thread */
nhdp_pid = thread_create(nhdp_stack, sizeof(nhdp_stack), THREAD_PRIORITY_MAIN - 1,
CREATE_STACKTEST, _nhdp_runner, NULL, "NHDP");
THREAD_CREATE_STACKTEST, _nhdp_runner, NULL, "NHDP");
#if (NHDP_METRIC_NEEDS_TIMER)
/* Configure periodic timer message to refresh metric values */
@ -193,7 +193,7 @@ int nhdp_register_if(kernel_pid_t if_pid, uint8_t *addr, size_t addr_size, uint8
/* Start the receiving thread */
nhdp_rcv_pid = thread_create(nhdp_rcv_stack, sizeof(nhdp_rcv_stack), THREAD_PRIORITY_MAIN - 1,
CREATE_STACKTEST, _nhdp_receiver, NULL, "nhdp_rcv_thread");
THREAD_CREATE_STACKTEST, _nhdp_receiver, NULL, "nhdp_rcv_thread");
/* Start sending periodic HELLO */
signal_msg.type = MSG_TIMER;

View File

@ -143,7 +143,7 @@ int pthread_create(pthread_t *newthread, const pthread_attr_t *attr, void *(*sta
volatile kernel_pid_t pid = thread_create(pthread_reaper_stack,
PTHREAD_REAPER_STACKSIZE,
0,
CREATE_STACKTEST,
THREAD_CREATE_STACKTEST,
pthread_reaper,
NULL,
"pthread-reaper");
@ -155,7 +155,8 @@ int pthread_create(pthread_t *newthread, const pthread_attr_t *attr, void *(*sta
pt->thread_pid = thread_create(stack,
stack_size,
THREAD_PRIORITY_MAIN,
CREATE_WOUT_YIELD | CREATE_STACKTEST,
THREAD_CREATE_WOUT_YIELD |
THREAD_CREATE_STACKTEST,
pthread_start_routine,
pt,
"pthread");