RTEMS 6.1-rc4
Loading...
Searching...
No Matches
bdbuf.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
20/*
21 * Copyright (C) 2020 embedded brains GmbH & Co. KG
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the above copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 *
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
33 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
35 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
36 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
37 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
38 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
39 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
40 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
41 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42 * POSSIBILITY OF SUCH DAMAGE.
43 */
44
45#ifndef _RTEMS_CONFDEFS_BDBUF_H
46#define _RTEMS_CONFDEFS_BDBUF_H
47
48#ifndef __CONFIGURATION_TEMPLATE_h
49#error "Do not include this file directly, use <rtems/confdefs.h> instead"
50#endif
51
52#ifdef CONFIGURE_INIT
53
54#ifdef CONFIGURE_APPLICATION_NEEDS_LIBBLOCK
55
57#include <rtems/bdbuf.h>
58
59#ifndef CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS
60 #define CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS \
61 RTEMS_BDBUF_MAX_READ_AHEAD_BLOCKS_DEFAULT
62#endif
63
64#ifndef CONFIGURE_BDBUF_MAX_WRITE_BLOCKS
65 #define CONFIGURE_BDBUF_MAX_WRITE_BLOCKS \
66 RTEMS_BDBUF_MAX_WRITE_BLOCKS_DEFAULT
67#endif
68
69#ifndef CONFIGURE_SWAPOUT_TASK_PRIORITY
70 #define CONFIGURE_SWAPOUT_TASK_PRIORITY \
71 RTEMS_BDBUF_SWAPOUT_TASK_PRIORITY_DEFAULT
72#endif
73
74#ifndef CONFIGURE_SWAPOUT_SWAP_PERIOD
75 #define CONFIGURE_SWAPOUT_SWAP_PERIOD \
76 RTEMS_BDBUF_SWAPOUT_TASK_SWAP_PERIOD_DEFAULT
77#endif
78
79#ifndef CONFIGURE_SWAPOUT_BLOCK_HOLD
80 #define CONFIGURE_SWAPOUT_BLOCK_HOLD \
81 RTEMS_BDBUF_SWAPOUT_TASK_BLOCK_HOLD_DEFAULT
82#endif
83
84#ifndef CONFIGURE_SWAPOUT_WORKER_TASKS
85 #define CONFIGURE_SWAPOUT_WORKER_TASKS \
86 RTEMS_BDBUF_SWAPOUT_WORKER_TASKS_DEFAULT
87#endif
88
89#ifndef CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY
90 #define CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY \
91 RTEMS_BDBUF_SWAPOUT_WORKER_TASK_PRIORITY_DEFAULT
92#endif
93
94#ifndef CONFIGURE_BDBUF_TASK_STACK_SIZE
95 #define CONFIGURE_BDBUF_TASK_STACK_SIZE \
96 RTEMS_BDBUF_TASK_STACK_SIZE_DEFAULT
97#endif
98
99#ifndef CONFIGURE_BDBUF_CACHE_MEMORY_SIZE
100 #define CONFIGURE_BDBUF_CACHE_MEMORY_SIZE \
101 RTEMS_BDBUF_CACHE_MEMORY_SIZE_DEFAULT
102#endif
103
104#ifndef CONFIGURE_BDBUF_BUFFER_MIN_SIZE
105 #define CONFIGURE_BDBUF_BUFFER_MIN_SIZE \
106 RTEMS_BDBUF_BUFFER_MIN_SIZE_DEFAULT
107#endif
108
109#ifndef CONFIGURE_BDBUF_BUFFER_MAX_SIZE
110 #define CONFIGURE_BDBUF_BUFFER_MAX_SIZE \
111 RTEMS_BDBUF_BUFFER_MAX_SIZE_DEFAULT
112#endif
113
114#ifndef CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY
115 #define CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY \
116 RTEMS_BDBUF_READ_AHEAD_TASK_PRIORITY_DEFAULT
117#endif
118
119#define _CONFIGURE_LIBBLOCK_TASKS \
120 ( 1 + CONFIGURE_SWAPOUT_WORKER_TASKS \
121 + ( CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS != 0 ) )
122
123#define _CONFIGURE_LIBBLOCK_TASKS_STACK_EXTRA \
124 ( _CONFIGURE_LIBBLOCK_TASKS \
125 * ( CONFIGURE_BDBUF_TASK_STACK_SIZE <= CONFIGURE_MINIMUM_TASK_STACK_SIZE ? \
126 0 : \
127 CONFIGURE_BDBUF_TASK_STACK_SIZE - CONFIGURE_MINIMUM_TASK_STACK_SIZE ) )
128
129#ifdef __cplusplus
130extern "C" {
131#endif
132
146};
147
148#ifdef __cplusplus
149}
150#endif
151
152#else /* !CONFIGURE_APPLICATION_NEEDS_LIBBLOCK */
153
154#define _CONFIGURE_LIBBLOCK_TASKS 0
155
156#define _CONFIGURE_LIBBLOCK_TASKS_STACK_EXTRA 0
157
158#endif /* CONFIGURE_APPLICATION_NEEDS_LIBBLOCK */
159
160#endif /* CONFIGURE_INIT */
161
162#endif /* _RTEMS_CONFDEFS_BDBUF_H */
Block Device Buffer Management.
This header file evaluates configuration options related to the per-CPU configuration.
#define CONFIGURE_BDBUF_READ_AHEAD_TASK_PRIORITY
This configuration option is an integer define.
Definition: appl-config.h:248
#define CONFIGURE_SWAPOUT_SWAP_PERIOD
This configuration option is an integer define.
Definition: appl-config.h:332
#define CONFIGURE_SWAPOUT_WORKER_TASK_PRIORITY
This configuration option is an integer define.
Definition: appl-config.h:397
#define CONFIGURE_BDBUF_TASK_STACK_SIZE
This configuration option is an integer define.
Definition: appl-config.h:280
#define CONFIGURE_BDBUF_CACHE_MEMORY_SIZE
This configuration option is an integer define.
Definition: appl-config.h:172
#define CONFIGURE_BDBUF_MAX_READ_AHEAD_BLOCKS
This configuration option is an integer define.
Definition: appl-config.h:203
#define CONFIGURE_SWAPOUT_BLOCK_HOLD
This configuration option is an integer define.
Definition: appl-config.h:306
#define CONFIGURE_BDBUF_BUFFER_MAX_SIZE
This configuration option is an integer define.
Definition: appl-config.h:120
#define CONFIGURE_SWAPOUT_WORKER_TASKS
This configuration option is an integer define.
Definition: appl-config.h:377
#define CONFIGURE_SWAPOUT_TASK_PRIORITY
This configuration option is an integer define.
Definition: appl-config.h:351
#define CONFIGURE_BDBUF_BUFFER_MIN_SIZE
This configuration option is an integer define.
Definition: appl-config.h:146
#define CONFIGURE_BDBUF_MAX_WRITE_BLOCKS
This configuration option is an integer define.
Definition: appl-config.h:229
const rtems_bdbuf_config rtems_bdbuf_configuration
Definition: bdbuf.h:361