Batch 28 commit 3847b17 gave ESP ringbuf reserve/publish (1 of 3 passed) and RT-Thread dataqueue wrap reset (0 of 3) as HARD, and RT-Thread condition wait transitions and NuttX NSH quoted script flow (2 of 3) as MEDIUM. Each task comes from the commit Qwen measured, its digest matches, and it is still present at the batch branch head. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
26 lines
981 B
C
26 lines
981 B
C
/* SPDX-License-Identifier: Apache-2.0 */
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <rtthread.h>
|
|
#include <rtdevice.h>
|
|
static struct rt_thread service;
|
|
static unsigned char stack[65536];
|
|
static int payload=42;
|
|
static void run(void *unused) {
|
|
struct rt_data_queue queue={0};
|
|
const void *p=NULL;rt_size_t n=0;
|
|
(void)unused;
|
|
printf("init=%ld\n",rt_data_queue_init(&queue,4,0,NULL));
|
|
printf("push=%ld\n",rt_data_queue_push(&queue,&payload,sizeof(payload),0));
|
|
printf("peak=%ld\n",rt_data_queue_peak(&queue,&p,&n));
|
|
printf("pop=%ld\n",rt_data_queue_pop(&queue,&p,&n,0));
|
|
printf("received=%d size=%lu\n",p==&payload,(unsigned long)n);
|
|
printf("deinit=%ld\n",rt_data_queue_deinit(&queue));
|
|
exit(0);
|
|
}
|
|
int main(void) {
|
|
rt_system_timer_init();rt_system_scheduler_init();rt_thread_idle_init();
|
|
rt_thread_init(&service,"service",run,NULL,stack,sizeof(stack),10,100);
|
|
rt_thread_startup(&service);rt_system_scheduler_start();return 0;
|
|
}
|