diff --git a/lib/contiki-core/sys/autostart.c b/lib/contiki-core/sys/autostart.c index 19aed8add..9329a9f52 100644 --- a/lib/contiki-core/sys/autostart.c +++ b/lib/contiki-core/sys/autostart.c @@ -57,7 +57,7 @@ autostart_start(struct process * const processes[]) int i; for(i = 0; processes[i] != NULL; ++i) { - process_start(processes[i], NULL); + process_start(processes[i]); PRINTF("autostart_start: starting process '%s'\n", processes[i]->name); } } diff --git a/lib/contiki-core/sys/ctimer.c b/lib/contiki-core/sys/ctimer.c index f74fd9046..ff5be8da0 100644 --- a/lib/contiki-core/sys/ctimer.c +++ b/lib/contiki-core/sys/ctimer.c @@ -93,7 +93,7 @@ ctimer_init(void) { initialized = 0; list_init(ctimer_list); - process_start(&ctimer_process, NULL); + process_start(&ctimer_process); } /*---------------------------------------------------------------------------*/ void diff --git a/lib/contiki-core/sys/process.c b/lib/contiki-core/sys/process.c index 25bb4f8c6..79b765cb8 100644 --- a/lib/contiki-core/sys/process.c +++ b/lib/contiki-core/sys/process.c @@ -97,7 +97,7 @@ process_alloc_event(void) } /*---------------------------------------------------------------------------*/ void -process_start(struct process *p, process_data_t data) +process_start(struct process *p) { struct process *q; @@ -118,7 +118,7 @@ process_start(struct process *p, process_data_t data) PRINTF("process: starting '%s'\n", PROCESS_NAME_STRING(p)); /* Post a synchronous initialization event to the process. */ - process_post_synch(p, PROCESS_EVENT_INIT, data); + process_post_synch(p, PROCESS_EVENT_INIT, NULL); } /*---------------------------------------------------------------------------*/ static void diff --git a/lib/contiki-core/sys/process.h b/lib/contiki-core/sys/process.h index 76d336525..aa4318ad6 100644 --- a/lib/contiki-core/sys/process.h +++ b/lib/contiki-core/sys/process.h @@ -335,12 +335,8 @@ struct process { * Start a process. * * \param p A pointer to a process structure. - * - * \param data An argument pointer that can be passed to the new - * process - * */ -CCIF void process_start(struct process *p, process_data_t data); +CCIF void process_start(struct process *p); /** * Post an asynchronous event. diff --git a/lib/contiki-core/sys/procinit.c b/lib/contiki-core/sys/procinit.c index ca09fc3dd..96bf82876 100644 --- a/lib/contiki-core/sys/procinit.c +++ b/lib/contiki-core/sys/procinit.c @@ -43,7 +43,7 @@ procinit_init(void) int i; for(i = 0; procinit[i] != NULL; ++i) { - process_start((struct process *)procinit[i], NULL); + process_start((struct process *)procinit[i]); } } /*---------------------------------------------------------------------------*/ diff --git a/lib/contiki-core/sys/subprocess.h b/lib/contiki-core/sys/subprocess.h index 1281aa6cc..317845c62 100644 --- a/lib/contiki-core/sys/subprocess.h +++ b/lib/contiki-core/sys/subprocess.h @@ -57,7 +57,7 @@ { \ static struct process subprocess_subprocess = {NULL, strname}; \ subprocess_subprocess.thread = PROCESS_CURRENT()->thread; \ - process_start(&subprocess_subprocess, NULL); \ + process_start(&subprocess_subprocess); \ PT_INIT(&subprocess_subprocess.pt); \ LC_SET(subprocess_subprocess.pt.lc); \ if(PROCESS_CURRENT() == &subprocess_subprocess) { diff --git a/lib/pbio/drv/bluetooth/bluetooth_btstack_run_loop_contiki.c b/lib/pbio/drv/bluetooth/bluetooth_btstack_run_loop_contiki.c index dbbb53efe..b8f634184 100644 --- a/lib/pbio/drv/bluetooth/bluetooth_btstack_run_loop_contiki.c +++ b/lib/pbio/drv/bluetooth/bluetooth_btstack_run_loop_contiki.c @@ -37,7 +37,7 @@ static void schedule_timer(void) { } static void btstack_run_loop_contiki_init(void) { - process_start(&btstack_run_loop_contiki_process, NULL); + process_start(&btstack_run_loop_contiki_process); } static void btstack_run_loop_contiki_add_data_source(btstack_data_source_t *ds) { diff --git a/lib/pbio/drv/bluetooth/bluetooth_stm32_bluenrg.c b/lib/pbio/drv/bluetooth/bluetooth_stm32_bluenrg.c index fab5e5afc..1a019e383 100644 --- a/lib/pbio/drv/bluetooth/bluetooth_stm32_bluenrg.c +++ b/lib/pbio/drv/bluetooth/bluetooth_stm32_bluenrg.c @@ -179,7 +179,7 @@ void pbdrv_bluetooth_init(void) { void pbdrv_bluetooth_power_on(bool on) { if (on) { - process_start(&pbdrv_bluetooth_spi_process, NULL); + process_start(&pbdrv_bluetooth_spi_process); } else { // REVISIT: should probably gracefully shutdown in case we are in the // middle of something diff --git a/lib/pbio/drv/bluetooth/bluetooth_stm32_cc2640.c b/lib/pbio/drv/bluetooth/bluetooth_stm32_cc2640.c index 865f9baf4..d49e99bd4 100644 --- a/lib/pbio/drv/bluetooth/bluetooth_stm32_cc2640.c +++ b/lib/pbio/drv/bluetooth/bluetooth_stm32_cc2640.c @@ -218,7 +218,7 @@ void pbdrv_bluetooth_init(void) { void pbdrv_bluetooth_power_on(bool on) { if (on) { - process_start(&pbdrv_bluetooth_spi_process, NULL); + process_start(&pbdrv_bluetooth_spi_process); } else { // REVISIT: should probably gracefully shutdown in case we are in the // middle of something diff --git a/lib/pbio/drv/core.c b/lib/pbio/drv/core.c index 21c0aa070..60e446cd4 100644 --- a/lib/pbio/drv/core.c +++ b/lib/pbio/drv/core.c @@ -21,7 +21,7 @@ uint32_t pbdrv_init_busy_count; void pbdrv_init(void) { clock_init(); process_init(); - process_start(&etimer_process, NULL); + process_start(&etimer_process); pbdrv_battery_init(); pbdrv_bluetooth_init(); pbdrv_counter_init(); diff --git a/lib/pbio/drv/ioport/ioport_lpf2.c b/lib/pbio/drv/ioport/ioport_lpf2.c index e77a668aa..51452029c 100644 --- a/lib/pbio/drv/ioport/ioport_lpf2.c +++ b/lib/pbio/drv/ioport/ioport_lpf2.c @@ -136,7 +136,7 @@ PROCESS(pbdrv_ioport_lpf2_process, "I/O port"); static ioport_dev_t ioport_devs[PBDRV_CONFIG_IOPORT_LPF2_NUM_PORTS]; void pbdrv_ioport_lpf2_init(void) { - process_start(&pbdrv_ioport_lpf2_process, NULL); + process_start(&pbdrv_ioport_lpf2_process); } void pbdrv_ioport_lpf2_shutdown(void) { diff --git a/lib/pbio/drv/pwm/pwm_tlc5955_stm32.c b/lib/pbio/drv/pwm/pwm_tlc5955_stm32.c index f524efba3..3121fdec0 100644 --- a/lib/pbio/drv/pwm/pwm_tlc5955_stm32.c +++ b/lib/pbio/drv/pwm/pwm_tlc5955_stm32.c @@ -243,7 +243,7 @@ void pbdrv_pwm_tlc5955_stm32_init(pbdrv_pwm_dev_t *devs) { pbdrv_init_busy_up(); } - process_start(&pwm_tlc5955_stm32, NULL); + process_start(&pwm_tlc5955_stm32); } // toggles LAT signal on and off to latch data in shift register diff --git a/lib/pbio/src/light/animation.c b/lib/pbio/src/light/animation.c index 07cfbdcfc..d65a427d7 100644 --- a/lib/pbio/src/light/animation.c +++ b/lib/pbio/src/light/animation.c @@ -49,7 +49,7 @@ void pbio_light_animation_start(pbio_light_animation_t *animation) { animation->next_animation = pbio_light_animation_list_head; pbio_light_animation_list_head = animation; - process_start(&pbio_light_animation_process, NULL); + process_start(&pbio_light_animation_process); // HACK: init timer since we don't call etimer_set() timer_set(&animation->timer.timer, 0); // fake a timer event to load the first cell and start the timer diff --git a/lib/pbio/sys/bluetooth.c b/lib/pbio/sys/bluetooth.c index e78bdab42..f3422290f 100644 --- a/lib/pbio/sys/bluetooth.c +++ b/lib/pbio/sys/bluetooth.c @@ -51,7 +51,7 @@ void pbsys_bluetooth_init(void) { lwrb_init(&uart_tx_ring, uart_tx_buf, PBIO_ARRAY_SIZE(uart_tx_buf)); lwrb_init(&uart_rx_ring, uart_rx_buf, PBIO_ARRAY_SIZE(uart_rx_buf)); - process_start(&pbsys_bluetooth_process, NULL); + process_start(&pbsys_bluetooth_process); } static void on_event(void) { diff --git a/lib/pbio/test/drv/bluetooth.c b/lib/pbio/test/drv/bluetooth.c index 10fcfb97e..7e9c62fcc 100644 --- a/lib/pbio/test/drv/bluetooth.c +++ b/lib/pbio/test/drv/bluetooth.c @@ -452,8 +452,8 @@ PROCESS_THREAD(test_uart_send_process, ev, data) { static int test_uart_block_init(const btstack_uart_config_t *uart_config) { log_debug("%s", __func__); - process_start(&test_uart_receive_process, NULL); - process_start(&test_uart_send_process, NULL); + process_start(&test_uart_receive_process); + process_start(&test_uart_send_process); return 0; } diff --git a/lib/pbio/test/src/servo.c b/lib/pbio/test/src/servo.c index 9fd74381f..64302f060 100644 --- a/lib/pbio/test/src/servo.c +++ b/lib/pbio/test/src/servo.c @@ -85,7 +85,7 @@ static PT_THREAD(test_servo_run_func(struct pt *pt, const char *name, pbio_error PT_BEGIN(pt); - process_start(&pbio_motor_process, NULL); + process_start(&pbio_motor_process); tt_want(process_is_running(&pbio_motor_process)); tt_uint_op(pbio_motor_process_get_servo(PBIO_PORT_ID_A, &servo), ==, PBIO_SUCCESS); diff --git a/lib/pbio/test/src/uartdev.c b/lib/pbio/test/src/uartdev.c index 9f4ee4f32..e377bf1d5 100644 --- a/lib/pbio/test/src/uartdev.c +++ b/lib/pbio/test/src/uartdev.c @@ -221,7 +221,7 @@ static PT_THREAD(test_boost_color_distance_sensor(struct pt *pt)) { PT_BEGIN(pt); - process_start(&pbio_uartdev_process, NULL); + process_start(&pbio_uartdev_process); // starting baud rate of hub PT_WAIT_UNTIL(pt, { @@ -507,7 +507,7 @@ static PT_THREAD(test_boost_interactive_motor(struct pt *pt)) { PT_BEGIN(pt); - process_start(&pbio_uartdev_process, NULL); + process_start(&pbio_uartdev_process); // starting baud rate of hub PT_WAIT_UNTIL(pt, { @@ -695,7 +695,7 @@ static PT_THREAD(test_technic_large_motor(struct pt *pt)) { PT_BEGIN(pt); - process_start(&pbio_uartdev_process, NULL); + process_start(&pbio_uartdev_process); // baud rate for sync messages PT_WAIT_UNTIL(pt, { @@ -903,7 +903,7 @@ static PT_THREAD(test_technic_xl_motor(struct pt *pt)) { PT_BEGIN(pt); - process_start(&pbio_uartdev_process, NULL); + process_start(&pbio_uartdev_process); // baud rate for sync messages PT_WAIT_UNTIL(pt, { diff --git a/lib/pbio/test/sys/status.c b/lib/pbio/test/sys/status.c index 1416d7ba0..19ea78332 100644 --- a/lib/pbio/test/sys/status.c +++ b/lib/pbio/test/sys/status.c @@ -32,7 +32,7 @@ PROCESS_THREAD(status_test_process, ev, data) { static PT_THREAD(test_status(struct pt *pt)) { PT_BEGIN(pt); - process_start(&status_test_process, NULL); + process_start(&status_test_process); // use the last valid flag for edge case static const pbio_pybricks_status_t test_flag = NUM_PBIO_PYBRICKS_STATUS - 1;