OpenBIC
OpenSource Bridge-IC
util_worker.c File Reference
#include <zephyr.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "util_worker.h"
#include "cmsis_os2.h"
#include "libutil.h"
#include "plat_def.h"
#include <logging/log.h>
Include dependency graph for util_worker.c:

Classes

struct  work_info
 

Macros

#define WORKER_STACK_SIZE   10000
 
#define WORKER_PRIORITY   CONFIG_MAIN_THREAD_PRIORITY
 
#define MAX_WORK_COUNT   32
 
#define WARN_WORK_PROC_TIME_MS   1000
 

Functions

 LOG_MODULE_REGISTER (util_worker)
 
 K_THREAD_STACK_DEFINE (worker_stack_area, WORKER_STACK_SIZE)
 
 K_THREAD_STACK_DEFINE (plat_worker_stack_area, WORKER_STACK_SIZE)
 
uint8_t get_work_count ()
 
int add_work (worker_job *job)
 
void init_worker ()
 
void init_plat_worker (int priority)
 

Variables

struct k_work_q plat_work_q
 

Macro Definition Documentation

◆ MAX_WORK_COUNT

#define MAX_WORK_COUNT   32

◆ WARN_WORK_PROC_TIME_MS

#define WARN_WORK_PROC_TIME_MS   1000

◆ WORKER_PRIORITY

#define WORKER_PRIORITY   CONFIG_MAIN_THREAD_PRIORITY

◆ WORKER_STACK_SIZE

#define WORKER_STACK_SIZE   10000

Function Documentation

◆ add_work()

int add_work ( worker_job job)

◆ get_work_count()

uint8_t get_work_count ( )

◆ init_plat_worker()

void init_plat_worker ( int  priority)

◆ init_worker()

void init_worker ( )

◆ K_THREAD_STACK_DEFINE() [1/2]

K_THREAD_STACK_DEFINE ( plat_worker_stack_area  ,
WORKER_STACK_SIZE   
)

◆ K_THREAD_STACK_DEFINE() [2/2]

K_THREAD_STACK_DEFINE ( worker_stack_area  ,
WORKER_STACK_SIZE   
)

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( util_worker  )

Variable Documentation

◆ plat_work_q

struct k_work_q plat_work_q