aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel/include
diff options
context:
space:
mode:
Diffstat (limited to 'os/kernel/include')
-rw-r--r--os/kernel/include/chbsem.h6
-rw-r--r--os/kernel/include/chcond.h10
-rw-r--r--os/kernel/include/chdynamic.h16
-rw-r--r--os/kernel/include/chevents.h10
-rw-r--r--os/kernel/include/chheap.h14
-rw-r--r--os/kernel/include/chlists.h4
-rw-r--r--os/kernel/include/chmboxes.h8
-rw-r--r--os/kernel/include/chmemcore.h4
-rw-r--r--os/kernel/include/chmempools.h8
-rw-r--r--os/kernel/include/chmsg.h4
-rw-r--r--os/kernel/include/chmtx.h4
-rw-r--r--os/kernel/include/chqueues.h5
-rw-r--r--os/kernel/include/chregistry.h12
-rw-r--r--os/kernel/include/chschd.h8
-rw-r--r--os/kernel/include/chsem.h6
-rw-r--r--os/kernel/include/chsys.h2
-rw-r--r--os/kernel/include/chthreads.h28
-rw-r--r--os/kernel/include/chvt.h6
18 files changed, 77 insertions, 78 deletions
diff --git a/os/kernel/include/chbsem.h b/os/kernel/include/chbsem.h
index 2808f9c41..6a5397e8e 100644
--- a/os/kernel/include/chbsem.h
+++ b/os/kernel/include/chbsem.h
@@ -43,7 +43,7 @@
* mutexes can only be taken and released by the same thread. Another
* difference is that binary semaphores, unlike mutexes, do not
* implement the priority inheritance protocol.<br>
- * In order to use the binary semaphores APIs the @p CH_USE_SEMAPHORES
+ * In order to use the binary semaphores APIs the @p CH_CFG_USE_SEMAPHORES
* option must be enabled in @p chconf.h.
* @{
*/
@@ -51,7 +51,7 @@
#ifndef _CHBSEM_H_
#define _CHBSEM_H_
-#if CH_USE_SEMAPHORES || defined(__DOXYGEN__)
+#if CH_CFG_USE_SEMAPHORES || defined(__DOXYGEN__)
/*===========================================================================*/
/* Module constants. */
@@ -305,7 +305,7 @@ static inline bool chBSemGetStateI(binary_semaphore_t *bsp) {
return bsp->bs_sem.s_cnt > 0 ? false : true;
}
-#endif /* CH_USE_SEMAPHORES */
+#endif /* CH_CFG_USE_SEMAPHORES */
#endif /* _CHBSEM_H_ */
diff --git a/os/kernel/include/chcond.h b/os/kernel/include/chcond.h
index 5b26a2281..802d59d3a 100644
--- a/os/kernel/include/chcond.h
+++ b/os/kernel/include/chcond.h
@@ -32,7 +32,7 @@
#ifndef _CHCOND_H_
#define _CHCOND_H_
-#if CH_USE_CONDVARS || defined(__DOXYGEN__)
+#if CH_CFG_USE_CONDVARS || defined(__DOXYGEN__)
/*===========================================================================*/
/* Module constants. */
@@ -46,8 +46,8 @@
/* Derived constants and error checks. */
/*===========================================================================*/
-#if !CH_USE_MUTEXES
-#error "CH_USE_CONDVARS requires CH_USE_MUTEXES"
+#if !CH_CFG_USE_MUTEXES
+#error "CH_CFG_USE_CONDVARS requires CH_CFG_USE_MUTEXES"
#endif
/*===========================================================================*/
@@ -98,7 +98,7 @@ extern "C" {
void chCondBroadcastI(condition_variable_t *cp);
msg_t chCondWait(condition_variable_t *cp);
msg_t chCondWaitS(condition_variable_t *cp);
-#if CH_USE_CONDVARS_TIMEOUT
+#if CH_CFG_USE_CONDVARS_TIMEOUT
msg_t chCondWaitTimeout(condition_variable_t *cp, systime_t time);
msg_t chCondWaitTimeoutS(condition_variable_t *cp, systime_t time);
#endif
@@ -110,7 +110,7 @@ extern "C" {
/* Module inline functions. */
/*===========================================================================*/
-#endif /* CH_USE_CONDVARS */
+#endif /* CH_CFG_USE_CONDVARS */
#endif /* _CHCOND_H_ */
diff --git a/os/kernel/include/chdynamic.h b/os/kernel/include/chdynamic.h
index 752fee90c..cb72bb244 100644
--- a/os/kernel/include/chdynamic.h
+++ b/os/kernel/include/chdynamic.h
@@ -29,7 +29,7 @@
#ifndef _CHDYNAMIC_H_
#define _CHDYNAMIC_H_
-#if CH_USE_DYNAMIC || defined(__DOXYGEN__)
+#if CH_CFG_USE_DYNAMIC || defined(__DOXYGEN__)
/*===========================================================================*/
/* Module constants. */
@@ -46,11 +46,11 @@
/*
* Module dependencies check.
*/
-#if CH_USE_DYNAMIC && !CH_USE_WAITEXIT
-#error "CH_USE_DYNAMIC requires CH_USE_WAITEXIT"
+#if CH_CFG_USE_DYNAMIC && !CH_CFG_USE_WAITEXIT
+#error "CH_CFG_USE_DYNAMIC requires CH_CFG_USE_WAITEXIT"
#endif
-#if CH_USE_DYNAMIC && !CH_USE_HEAP && !CH_USE_MEMPOOLS
-#error "CH_USE_DYNAMIC requires CH_USE_HEAP and/or CH_USE_MEMPOOLS"
+#if CH_CFG_USE_DYNAMIC && !CH_CFG_USE_HEAP && !CH_CFG_USE_MEMPOOLS
+#error "CH_CFG_USE_DYNAMIC requires CH_CFG_USE_HEAP and/or CH_CFG_USE_MEMPOOLS"
#endif
/*===========================================================================*/
@@ -73,11 +73,11 @@ extern "C" {
#endif
thread_t *chThdAddRef(thread_t *tp);
void chThdRelease(thread_t *tp);
-#if CH_USE_HEAP
+#if CH_CFG_USE_HEAP
thread_t *chThdCreateFromHeap(memory_heap_t *heapp, size_t size,
tprio_t prio, tfunc_t pf, void *arg);
#endif
-#if CH_USE_MEMPOOLS
+#if CH_CFG_USE_MEMPOOLS
thread_t *chThdCreateFromMemoryPool(memory_pool_t *mp, tprio_t prio,
tfunc_t pf, void *arg);
#endif
@@ -89,7 +89,7 @@ extern "C" {
/* Module inline functions. */
/*===========================================================================*/
-#endif /* CH_USE_DYNAMIC */
+#endif /* CH_CFG_USE_DYNAMIC */
#endif /* _CHDYNAMIC_H_ */
diff --git a/os/kernel/include/chevents.h b/os/kernel/include/chevents.h
index 327b16c88..e15d0e6cb 100644
--- a/os/kernel/include/chevents.h
+++ b/os/kernel/include/chevents.h
@@ -32,7 +32,7 @@
#ifndef _CHEVENTS_H_
#define _CHEVENTS_H_
-#if CH_USE_EVENTS || defined(__DOXYGEN__)
+#if CH_CFG_USE_EVENTS || defined(__DOXYGEN__)
/*===========================================================================*/
/* Module constants. */
@@ -131,12 +131,12 @@ extern "C" {
void chEvtBroadcastFlags(event_source_t *esp, eventflags_t flags);
void chEvtBroadcastFlagsI(event_source_t *esp, eventflags_t flags);
void chEvtDispatch(const evhandler_t *handlers, eventmask_t mask);
-#if CH_OPTIMIZE_SPEED || !CH_USE_EVENTS_TIMEOUT
+#if CH_CFG_OPTIMIZE_SPEED || !CH_CFG_USE_EVENTS_TIMEOUT
eventmask_t chEvtWaitOne(eventmask_t mask);
eventmask_t chEvtWaitAny(eventmask_t mask);
eventmask_t chEvtWaitAll(eventmask_t mask);
#endif
-#if CH_USE_EVENTS_TIMEOUT
+#if CH_CFG_USE_EVENTS_TIMEOUT
eventmask_t chEvtWaitOneTimeout(eventmask_t mask, systime_t time);
eventmask_t chEvtWaitAnyTimeout(eventmask_t mask, systime_t time);
eventmask_t chEvtWaitAllTimeout(eventmask_t mask, systime_t time);
@@ -145,7 +145,7 @@ extern "C" {
}
#endif
-#if !CH_OPTIMIZE_SPEED && CH_USE_EVENTS_TIMEOUT
+#if !CH_CFG_OPTIMIZE_SPEED && CH_CFG_USE_EVENTS_TIMEOUT
#define chEvtWaitOne(mask) chEvtWaitOneTimeout(mask, TIME_INFINITE)
#define chEvtWaitAny(mask) chEvtWaitAnyTimeout(mask, TIME_INFINITE)
#define chEvtWaitAll(mask) chEvtWaitAllTimeout(mask, TIME_INFINITE)
@@ -233,7 +233,7 @@ static inline void chEvtBroadcastI(event_source_t *esp) {
chEvtBroadcastFlagsI(esp, 0);
}
-#endif /* CH_USE_EVENTS */
+#endif /* CH_CFG_USE_EVENTS */
#endif /* _CHEVENTS_H_ */
diff --git a/os/kernel/include/chheap.h b/os/kernel/include/chheap.h
index bc5a9afb4..73e0d4148 100644
--- a/os/kernel/include/chheap.h
+++ b/os/kernel/include/chheap.h
@@ -29,7 +29,7 @@
#ifndef _CHHEAP_H_
#define _CHHEAP_H_
-#if CH_USE_HEAP || defined(__DOXYGEN__)
+#if CH_CFG_USE_HEAP || defined(__DOXYGEN__)
/*===========================================================================*/
/* Module constants. */
@@ -43,12 +43,12 @@
/* Derived constants and error checks. */
/*===========================================================================*/
-#if !CH_USE_MEMCORE
-#error "CH_USE_HEAP requires CH_USE_MEMCORE"
+#if !CH_CFG_USE_MEMCORE
+#error "CH_CFG_USE_HEAP requires CH_CFG_USE_MEMCORE"
#endif
-#if !CH_USE_MUTEXES && !CH_USE_SEMAPHORES
-#error "CH_USE_HEAP requires CH_USE_MUTEXES and/or CH_USE_SEMAPHORES"
+#if !CH_CFG_USE_MUTEXES && !CH_CFG_USE_SEMAPHORES
+#error "CH_CFG_USE_HEAP requires CH_CFG_USE_MUTEXES and/or CH_CFG_USE_SEMAPHORES"
#endif
/*===========================================================================*/
@@ -81,7 +81,7 @@ struct memory_heap {
memgetfunc_t h_provider; /**< @brief Memory blocks provider for
this heap. */
union heap_header h_free; /**< @brief Free blocks list header. */
-#if CH_USE_MUTEXES
+#if CH_CFG_USE_MUTEXES
mutex_t h_mtx; /**< @brief Heap access mutex. */
#else
semaphore_t h_sem; /**< @brief Heap access semaphore. */
@@ -112,7 +112,7 @@ extern "C" {
/* Module inline functions. */
/*===========================================================================*/
-#endif /* CH_USE_HEAP */
+#endif /* CH_CFG_USE_HEAP */
#endif /* _CHHEAP_H_ */
diff --git a/os/kernel/include/chlists.h b/os/kernel/include/chlists.h
index 3f71b2afc..69a42bcce 100644
--- a/os/kernel/include/chlists.h
+++ b/os/kernel/include/chlists.h
@@ -138,7 +138,7 @@ static inline bool queue_notempty(threads_queue_t *tqp) {
/* If the performance code path has been chosen then all the following
functions are inlined into the various kernel modules.*/
-#if CH_OPTIMIZE_SPEED
+#if CH_CFG_OPTIMIZE_SPEED
static inline void list_insert(thread_t *tp, threads_list_t *tlp) {
tp->p_next = tlp->p_next;
@@ -190,6 +190,6 @@ static inline thread_t *queue_dequeue(thread_t *tp) {
tp->p_next->p_prev = tp->p_prev;
return tp;
}
-#endif /* CH_OPTIMIZE_SPEED */
+#endif /* CH_CFG_OPTIMIZE_SPEED */
#endif /* _CHLISTS_H_ */
diff --git a/os/kernel/include/chmboxes.h b/os/kernel/include/chmboxes.h
index f34f32c87..8d1dedfd1 100644
--- a/os/kernel/include/chmboxes.h
+++ b/os/kernel/include/chmboxes.h
@@ -29,7 +29,7 @@
#ifndef _CHMBOXES_H_
#define _CHMBOXES_H_
-#if CH_USE_MAILBOXES || defined(__DOXYGEN__)
+#if CH_CFG_USE_MAILBOXES || defined(__DOXYGEN__)
/*===========================================================================*/
/* Module constants. */
@@ -43,8 +43,8 @@
/* Derived constants and error checks. */
/*===========================================================================*/
-#if !CH_USE_SEMAPHORES
-#error "CH_USE_MAILBOXES requires CH_USE_SEMAPHORES"
+#if !CH_CFG_USE_SEMAPHORES
+#error "CH_CFG_USE_MAILBOXES requires CH_CFG_USE_SEMAPHORES"
#endif
/*===========================================================================*/
@@ -193,7 +193,7 @@ static inline cnt_t chMBPeekI(mailbox_t *mbp) {
return *mbp->mb_rdptr;
}
-#endif /* CH_USE_MAILBOXES */
+#endif /* CH_CFG_USE_MAILBOXES */
#endif /* _CHMBOXES_H_ */
diff --git a/os/kernel/include/chmemcore.h b/os/kernel/include/chmemcore.h
index dbc5d5d60..314e94365 100644
--- a/os/kernel/include/chmemcore.h
+++ b/os/kernel/include/chmemcore.h
@@ -29,7 +29,7 @@
#ifndef _CHMEMCORE_H_
#define _CHMEMCORE_H_
-#if CH_USE_MEMCORE || defined(__DOXYGEN__)
+#if CH_CFG_USE_MEMCORE || defined(__DOXYGEN__)
/*===========================================================================*/
/* Module constants. */
@@ -107,7 +107,7 @@ extern "C" {
/* Module inline functions. */
/*===========================================================================*/
-#endif /* CH_USE_MEMCORE */
+#endif /* CH_CFG_USE_MEMCORE */
#endif /* _CHMEMCORE_H_ */
diff --git a/os/kernel/include/chmempools.h b/os/kernel/include/chmempools.h
index f09db04ea..85b94fc73 100644
--- a/os/kernel/include/chmempools.h
+++ b/os/kernel/include/chmempools.h
@@ -29,7 +29,7 @@
#ifndef _CHMEMPOOLS_H_
#define _CHMEMPOOLS_H_
-#if CH_USE_MEMPOOLS || defined(__DOXYGEN__)
+#if CH_CFG_USE_MEMPOOLS || defined(__DOXYGEN__)
/*===========================================================================*/
/* Module constants. */
@@ -39,8 +39,8 @@
/* Module pre-compile time settings. */
/*===========================================================================*/
-#if !CH_USE_MEMCORE
-#error "CH_USE_MEMPOOLS requires CH_USE_MEMCORE"
+#if !CH_CFG_USE_MEMCORE
+#error "CH_CFG_USE_MEMPOOLS requires CH_CFG_USE_MEMCORE"
#endif
/*===========================================================================*/
@@ -162,7 +162,7 @@ static inline void chPoolAddI(memory_pool_t *mp, void *objp) {
chPoolFreeI(mp, objp);
}
-#endif /* CH_USE_MEMPOOLS */
+#endif /* CH_CFG_USE_MEMPOOLS */
#endif /* _CHMEMPOOLS_H_ */
diff --git a/os/kernel/include/chmsg.h b/os/kernel/include/chmsg.h
index 4461b30dd..ff07edfb3 100644
--- a/os/kernel/include/chmsg.h
+++ b/os/kernel/include/chmsg.h
@@ -29,7 +29,7 @@
#ifndef _CHMSG_H_
#define _CHMSG_H_
-#if CH_USE_MESSAGES || defined(__DOXYGEN__)
+#if CH_CFG_USE_MESSAGES || defined(__DOXYGEN__)
/*===========================================================================*/
/* Module constants. */
@@ -113,7 +113,7 @@ static inline void chMsgReleaseS(thread_t *tp, msg_t msg) {
chSchWakeupS(tp, msg);
}
-#endif /* CH_USE_MESSAGES */
+#endif /* CH_CFG_USE_MESSAGES */
#endif /* _CHMSG_H_ */
diff --git a/os/kernel/include/chmtx.h b/os/kernel/include/chmtx.h
index d6f2ddf3d..a4ff5e49f 100644
--- a/os/kernel/include/chmtx.h
+++ b/os/kernel/include/chmtx.h
@@ -29,7 +29,7 @@
#ifndef _CHMTX_H_
#define _CHMTX_H_
-#if CH_USE_MUTEXES || defined(__DOXYGEN__)
+#if CH_CFG_USE_MUTEXES || defined(__DOXYGEN__)
/*===========================================================================*/
/* Module constants. */
@@ -119,7 +119,7 @@ static inline bool chMtxQueueNotEmptyS(mutex_t *mp) {
return queue_notempty(&mp->m_queue);
}
-#endif /* CH_USE_MUTEXES */
+#endif /* CH_CFG_USE_MUTEXES */
#endif /* _CHMTX_H_ */
diff --git a/os/kernel/include/chqueues.h b/os/kernel/include/chqueues.h
index acb2f8919..8449442c3 100644
--- a/os/kernel/include/chqueues.h
+++ b/os/kernel/include/chqueues.h
@@ -29,7 +29,7 @@
#ifndef _CHQUEUES_H_
#define _CHQUEUES_H_
-#if CH_USE_QUEUES || defined(__DOXYGEN__)
+#if CH_CFG_USE_QUEUES || defined(__DOXYGEN__)
/**
* @name Queue functions returned status value
@@ -362,7 +362,8 @@ extern "C" {
#ifdef __cplusplus
}
#endif
-#endif /* CH_USE_QUEUES */
+
+#endif /* CH_CFG_USE_QUEUES */
#endif /* _CHQUEUES_H_ */
diff --git a/os/kernel/include/chregistry.h b/os/kernel/include/chregistry.h
index b176058ce..a8318bc53 100644
--- a/os/kernel/include/chregistry.h
+++ b/os/kernel/include/chregistry.h
@@ -29,7 +29,7 @@
#ifndef _CHREGISTRY_H_
#define _CHREGISTRY_H_
-#if CH_USE_REGISTRY || defined(__DOXYGEN__)
+#if CH_CFG_USE_REGISTRY || defined(__DOXYGEN__)
/*===========================================================================*/
/* Module constants. */
@@ -121,7 +121,7 @@ extern "C" {
/**
* @brief Sets the current thread name.
* @pre This function only stores the pointer to the name if the option
- * @p CH_USE_REGISTRY is enabled else no action is performed.
+ * @p CH_CFG_USE_REGISTRY is enabled else no action is performed.
*
* @param[in] p thread name as a zero terminated string
*
@@ -129,7 +129,7 @@ extern "C" {
*/
static inline void chRegSetThreadName(const char *name) {
-#if CH_USE_REGISTRY
+#if CH_CFG_USE_REGISTRY
currp->p_name = name;
#else
(void)name;
@@ -139,7 +139,7 @@ static inline void chRegSetThreadName(const char *name) {
/**
* @brief Returns the name of the specified thread.
* @pre This function only returns the pointer to the name if the option
- * @p CH_USE_REGISTRY is enabled else @p NULL is returned.
+ * @p CH_CFG_USE_REGISTRY is enabled else @p NULL is returned.
*
* @param[in] tp pointer to the thread
*
@@ -152,7 +152,7 @@ static inline const char *chRegGetThreadNameI(thread_t *tp) {
chDbgCheckClassI();
-#if CH_USE_REGISTRY
+#if CH_CFG_USE_REGISTRY
return tp->p_name;
#else
(void)tp;
@@ -160,7 +160,7 @@ static inline const char *chRegGetThreadNameI(thread_t *tp) {
#endif
}
-#endif /* CH_USE_REGISTRY */
+#endif /* CH_CFG_USE_REGISTRY */
#endif /* _CHREGISTRY_H_ */
diff --git a/os/kernel/include/chschd.h b/os/kernel/include/chschd.h
index 3aa189dcd..0d12acdf0 100644
--- a/os/kernel/include/chschd.h
+++ b/os/kernel/include/chschd.h
@@ -98,7 +98,7 @@ typedef struct {
initialized to zero. */
struct context r_ctx; /**< @brief Not used, present because
offsets. */
-#if CH_USE_REGISTRY || defined(__DOXYGEN__)
+#if CH_CFG_USE_REGISTRY || defined(__DOXYGEN__)
thread_t *r_newer; /**< @brief Newer registry element. */
thread_t *r_older; /**< @brief Older registry element. */
#endif
@@ -222,7 +222,7 @@ static inline void chSchPreemption(void) {
tprio_t p1 = firstprio(&rlist.r_queue);
tprio_t p2 = currp->p_prio;
-#if CH_TIME_QUANTUM > 0
+#if CH_CFG_TIME_QUANTUM > 0
if (currp->p_preempt) {
if (p1 > p2)
chSchDoRescheduleAhead();
@@ -231,10 +231,10 @@ static inline void chSchPreemption(void) {
if (p1 >= p2)
chSchDoRescheduleBehind();
}
-#else /* CH_TIME_QUANTUM == 0 */
+#else /* CH_CFG_TIME_QUANTUM == 0 */
if (p1 >= p2)
chSchDoRescheduleAhead();
-#endif /* CH_TIME_QUANTUM == 0 */
+#endif /* CH_CFG_TIME_QUANTUM == 0 */
}
#endif /* _CHSCHD_H_ */
diff --git a/os/kernel/include/chsem.h b/os/kernel/include/chsem.h
index d8cbdc944..21ee14293 100644
--- a/os/kernel/include/chsem.h
+++ b/os/kernel/include/chsem.h
@@ -29,7 +29,7 @@
#ifndef _CHSEM_H_
#define _CHSEM_H_
-#if CH_USE_SEMAPHORES || defined(__DOXYGEN__)
+#if CH_CFG_USE_SEMAPHORES || defined(__DOXYGEN__)
/*===========================================================================*/
/* Module constants. */
@@ -99,9 +99,7 @@ extern "C" {
void chSemSignal(semaphore_t *sp);
void chSemSignalI(semaphore_t *sp);
void chSemAddCounterI(semaphore_t *sp, cnt_t n);
-#if CH_USE_SEMSW
msg_t chSemSignalWait(semaphore_t *sps, semaphore_t *spw);
-#endif
#ifdef __cplusplus
}
#endif
@@ -149,7 +147,7 @@ static inline cnt_t chSemGetCounterI(semaphore_t *sp) {
return sp->s_cnt;
}
-#endif /* CH_USE_SEMAPHORES */
+#endif /* CH_CFG_USE_SEMAPHORES */
#endif /* _CHSEM_H_ */
diff --git a/os/kernel/include/chsys.h b/os/kernel/include/chsys.h
index 5585117b6..e87d0c6c1 100644
--- a/os/kernel/include/chsys.h
+++ b/os/kernel/include/chsys.h
@@ -130,7 +130,7 @@ extern "C" {
static inline void chSysSwitch(thread_t *ntp, thread_t *otp) {
dbg_trace(otp);
- THREAD_CONTEXT_SWITCH_HOOK(ntp, otp);
+ CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp);
port_switch(ntp, otp);
}
diff --git a/os/kernel/include/chthreads.h b/os/kernel/include/chthreads.h
index ef5a0dbe9..f4785a268 100644
--- a/os/kernel/include/chthreads.h
+++ b/os/kernel/include/chthreads.h
@@ -94,7 +94,7 @@
/* Forward declaration required by the mutexes stack structure present
in every thread.*/
-#if CH_USE_MUTEXES
+#if CH_CFG_USE_MUTEXES
typedef struct mutex mutex_t;
#endif
@@ -131,12 +131,12 @@ typedef struct thread {
/* End of the fields shared with the threads_queue_t structure.*/
tprio_t p_prio; /**< @brief Thread priority. */
struct context p_ctx; /**< @brief Processor context. */
-#if CH_USE_REGISTRY || defined(__DOXYGEN__)
+#if CH_CFG_USE_REGISTRY || defined(__DOXYGEN__)
thread_t *p_newer; /**< @brief Newer registry element. */
thread_t *p_older; /**< @brief Older registry element. */
#endif
/* End of the fields shared with the ReadyList structure. */
-#if CH_USE_REGISTRY || defined(__DOXYGEN__)
+#if CH_CFG_USE_REGISTRY || defined(__DOXYGEN__)
/**
* @brief Thread name or @p NULL.
*/
@@ -156,7 +156,7 @@ typedef struct thread {
* @brief Various thread flags.
*/
tmode_t p_flags;
-#if CH_USE_DYNAMIC || defined(__DOXYGEN__)
+#if CH_CFG_USE_DYNAMIC || defined(__DOXYGEN__)
/**
* @brief References to this thread.
*/
@@ -165,7 +165,7 @@ typedef struct thread {
/**
* @brief Number of ticks remaining to this thread.
*/
-#if (CH_TIME_QUANTUM > 0) || defined(__DOXYGEN__)
+#if (CH_CFG_TIME_QUANTUM > 0) || defined(__DOXYGEN__)
tslices_t p_preempt;
#endif
#if CH_DBG_THREADS_PROFILING || defined(__DOXYGEN__)
@@ -202,7 +202,7 @@ typedef struct thread {
* states.
*/
void *wtobjp;
-#if CH_USE_EVENTS || defined(__DOXYGEN__)
+#if CH_CFG_USE_EVENTS || defined(__DOXYGEN__)
/**
* @brief Enabled events mask.
* @note This field is only valid while the thread is in the
@@ -211,13 +211,13 @@ typedef struct thread {
eventmask_t ewmask;
#endif
} p_u;
-#if CH_USE_WAITEXIT || defined(__DOXYGEN__)
+#if CH_CFG_USE_WAITEXIT || defined(__DOXYGEN__)
/**
* @brief Termination waiting list.
*/
threads_list_t p_waiting;
#endif
-#if CH_USE_MESSAGES || defined(__DOXYGEN__)
+#if CH_CFG_USE_MESSAGES || defined(__DOXYGEN__)
/**
* @brief Messages queue.
*/
@@ -227,13 +227,13 @@ typedef struct thread {
*/
msg_t p_msg;
#endif
-#if CH_USE_EVENTS || defined(__DOXYGEN__)
+#if CH_CFG_USE_EVENTS || defined(__DOXYGEN__)
/**
* @brief Pending events mask.
*/
eventmask_t p_epending;
#endif
-#if CH_USE_MUTEXES || defined(__DOXYGEN__)
+#if CH_CFG_USE_MUTEXES || defined(__DOXYGEN__)
/**
* @brief List of the mutexes owned by this thread.
* @note The list is terminated by a @p NULL in this field.
@@ -244,15 +244,15 @@ typedef struct thread {
*/
tprio_t p_realprio;
#endif
-#if (CH_USE_DYNAMIC && CH_USE_MEMPOOLS) || defined(__DOXYGEN__)
+#if (CH_CFG_USE_DYNAMIC && CH_CFG_USE_MEMPOOLS) || defined(__DOXYGEN__)
/**
* @brief Memory Pool where the thread workspace is returned.
*/
void *p_mpool;
#endif
-#if defined(THREAD_EXT_FIELDS)
+#if defined(CH_CFG_THREAD_EXTRA_FIELDS)
/* Extra fields defined in chconf.h.*/
- THREAD_EXT_FIELDS
+ CH_CFG_THREAD_EXTRA_FIELDS
#endif
} thread_t;
@@ -405,7 +405,7 @@ extern "C" {
void chThdYield(void);
void chThdExit(msg_t msg);
void chThdExitS(msg_t msg);
-#if CH_USE_WAITEXIT
+#if CH_CFG_USE_WAITEXIT
msg_t chThdWait(thread_t *tp);
#endif
#ifdef __cplusplus
diff --git a/os/kernel/include/chvt.h b/os/kernel/include/chvt.h
index 6e30d903c..e88d03d15 100644
--- a/os/kernel/include/chvt.h
+++ b/os/kernel/include/chvt.h
@@ -104,7 +104,7 @@ struct virtual_timer {
* @api
*/
#define S2ST(sec) \
- ((systime_t)((uint32_t)(sec) * (uint32_t)CH_FREQUENCY))
+ ((systime_t)((uint32_t)(sec) * (uint32_t)CH_CFG_FREQUENCY))
/**
* @brief Milliseconds to system ticks.
@@ -117,7 +117,7 @@ struct virtual_timer {
* @api
*/
#define MS2ST(msec) \
- ((systime_t)(((((uint32_t)(msec)) * ((uint32_t)CH_FREQUENCY) - 1UL) / \
+ ((systime_t)(((((uint32_t)(msec)) * ((uint32_t)CH_CFG_FREQUENCY) - 1UL) / \
1000UL) + 1UL))
/**
@@ -131,7 +131,7 @@ struct virtual_timer {
* @api
*/
#define US2ST(usec) \
- ((systime_t)(((((uint32_t)(usec)) * ((uint32_t)CH_FREQUENCY) - 1UL) / \
+ ((systime_t)(((((uint32_t)(usec)) * ((uint32_t)CH_CFG_FREQUENCY) - 1UL) / \
1000000UL) + 1UL))
/** @} */