summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/sapi')
-rw-r--r--cpukit/sapi/include/confdefs.h51
-rw-r--r--cpukit/sapi/inline/rtems/chain.inl52
2 files changed, 83 insertions, 20 deletions
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h
index 6cc93086e0..c8f5c57d5d 100644
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -727,32 +727,45 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
#define CONFIGURE_SWAPOUT_BLOCK_HOLD \
RTEMS_BDBUF_SWAPOUT_TASK_BLOCK_HOLD_DEFAULT
#endif
+ #ifndef CONFIGURE_SWAPOUT_WORKER_TASKS
+ #define CONFIGURE_SWAPOUT_WORKER_TASKS \
+ RTEMS_BDBUF_SWAPOUT_WORKER_TASKS_DEFAULT
+ #endif
+ #ifndef CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY
+ #define CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY \
+ RTEMS_BDBUF_SWAPOUT_WORKER_TASK_PRIORITY_DEFAULT
+ #endif
+ #ifndef CONFIGURE_BDBUF_CACHE_MEMORY_SIZE
+ #define CONFIGURE_BDBUF_CACHE_MEMORY_SIZE \
+ RTEMS_BDBUF_CACHE_MEMORY_SIZE_DEFAULT
+ #endif
+ #ifndef CONFIGURE_BDBUF_BUFFER_MIN_SIZE
+ #define CONFIGURE_BDBUF_BUFFER_MIN_SIZE \
+ RTEMS_BDBUF_BUFFER_MIN_SIZE_DEFAULT
+ #endif
+ #ifndef CONFIGURE_BDBUF_BUFFER_MAX_SIZE
+ #define CONFIGURE_BDBUF_BUFFER_MAX_SIZE \
+ RTEMS_BDBUF_BUFFER_MAX_SIZE_DEFAULT
+ #endif
#ifdef CONFIGURE_INIT
- rtems_bdbuf_config rtems_bdbuf_configuration = {
+ const rtems_bdbuf_config rtems_bdbuf_configuration = {
CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS,
CONFIGURE_BDBUF_MAX_WRITE_BLOCKS,
CONFIGURE_SWAPOUT_TASK_PRIORITY,
CONFIGURE_SWAPOUT_SWAP_PERIOD,
- CONFIGURE_SWAPOUT_BLOCK_HOLD
+ CONFIGURE_SWAPOUT_BLOCK_HOLD,
+ CONFIGURE_SWAPOUT_WORKER_TASKS,
+ CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY,
+ CONFIGURE_BDBUF_CACHE_MEMORY_SIZE,
+ CONFIGURE_BDBUF_BUFFER_MIN_SIZE,
+ CONFIGURE_BDBUF_BUFFER_MAX_SIZE
};
#endif
- #ifndef CONFIGURE_HAS_OWN_BDBUF_TABLE
- #ifndef CONFIGURE_BDBUF_BUFFER_COUNT
- #define CONFIGURE_BDBUF_BUFFER_COUNT 64
- #endif
-
- #ifndef CONFIGURE_BDBUF_BUFFER_SIZE
- #define CONFIGURE_BDBUF_BUFFER_SIZE 512
- #endif
- #ifdef CONFIGURE_INIT
- rtems_bdbuf_pool_config rtems_bdbuf_pool_configuration[] = {
- {CONFIGURE_BDBUF_BUFFER_SIZE, CONFIGURE_BDBUF_BUFFER_COUNT, NULL}
- };
- size_t rtems_bdbuf_pool_configuration_size =
- (sizeof(rtems_bdbuf_pool_configuration) /
- sizeof(rtems_bdbuf_pool_configuration[0]));
- #endif /* CONFIGURE_INIT */
- #endif /* CONFIGURE_HAS_OWN_BDBUF_TABLE */
+ #if defined(CONFIGURE_HAS_OWN_BDBUF_TABLE) || \
+ defined(CONFIGURE_BDBUF_BUFFER_SIZE) || \
+ defined(CONFIGURE_BDBUF_BUFFER_COUNT)
+ #error BDBUF Cache does not use a buffer configuration table. Please remove.
+ #endif
#endif /* CONFIGURE_APPLICATION_NEEDS_LIBBLOCK */
#if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/sapi/inline/rtems/chain.inl b/cpukit/sapi/inline/rtems/chain.inl
index ff4808cecf..7230eb032e 100644
--- a/cpukit/sapi/inline/rtems/chain.inl
+++ b/cpukit/sapi/inline/rtems/chain.inl
@@ -96,7 +96,7 @@ RTEMS_INLINE_ROUTINE bool rtems_chain_is_null_node(
*
* @param[in] the_chain is the chain to be operated upon.
*
- * @return This method returns the permanent head node of the chain.
+ * @return This method returns the permanent node of the chain.
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_head(
rtems_chain_control *the_chain
@@ -122,6 +122,56 @@ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_tail(
}
/**
+ * @brief Return pointer to Chain's First node after the permanent head.
+ *
+ * This function returns a pointer to the first node on the chain after the
+ * head.
+ *
+ * @param[in] the_chain is the chain to be operated upon.
+ *
+ * @return This method returns the first node of the chain.
+ */
+RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_first(
+ rtems_chain_control *the_chain
+)
+{
+ return _Chain_First( the_chain );
+}
+
+/**
+ * @brief Return pointer to Chain's Last node before the permanent tail.
+ *
+ * This function returns a pointer to the last node on the chain just before
+ * the tail.
+ *
+ * @param[in] the_chain is the chain to be operated upon.
+ *
+ * @return This method returns the last node of the chain.
+ */
+RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_last(
+ rtems_chain_control *the_chain
+)
+{
+ return _Chain_Last( the_chain );
+}
+
+/**
+ * @brief Return pointer the next node from this node
+ *
+ * This function returns a pointer to the next node after this node.
+ *
+ * @param[in] the_node is the node to be operated upon.
+ *
+ * @return This method returns the next node on the chain.
+ */
+RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_next(
+ rtems_chain_node *the_node
+)
+{
+ return _Chain_Next( the_node );
+}
+
+/**
* @brief Are Two Nodes Equal
*
* This function returns true if @a left and @a right are equal,