diff options
author | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2006-07-09 10:05:27 +0000 |
---|---|---|
committer | Thomas Doerfler <Thomas.Doerfler@embedded-brains.de> | 2006-07-09 10:05:27 +0000 |
commit | c9b005a9d2ed95bb1ab16fbc0c823c12a5c58b26 (patch) | |
tree | 38738aceaf0b1d08e1e41cd0059a1b8ddac79409 /cpukit/libblock | |
parent | Sync from freebsd6.1 (diff) | |
download | rtems-c9b005a9d2ed95bb1ab16fbc0c823c12a5c58b26.tar.bz2 |
applied patches for PR1117/1118/1119/1120
Diffstat (limited to 'cpukit/libblock')
-rw-r--r-- | cpukit/libblock/include/rtems/bdbuf.h | 3 | ||||
-rw-r--r-- | cpukit/libblock/src/bdbuf.c | 11 |
2 files changed, 9 insertions, 5 deletions
diff --git a/cpukit/libblock/include/rtems/bdbuf.h b/cpukit/libblock/include/rtems/bdbuf.h index 0a10636966..c966b2836e 100644 --- a/cpukit/libblock/include/rtems/bdbuf.h +++ b/cpukit/libblock/include/rtems/bdbuf.h @@ -91,6 +91,9 @@ typedef struct rtems_bdbuf_config { extern rtems_bdbuf_config rtems_bdbuf_configuration[]; extern int rtems_bdbuf_configuration_size; +#define SWAPOUT_TASK_DEFAULT_PRIORITY 15 +extern rtems_task_priority swapout_task_priority; + /* rtems_bdbuf_init -- * Prepare buffering layer to work - initialize buffer descritors * and (if it is neccessary) buffers. Buffers will be allocated accoriding diff --git a/cpukit/libblock/src/bdbuf.c b/cpukit/libblock/src/bdbuf.c index e388e5cea0..8fb7d515be 100644 --- a/cpukit/libblock/src/bdbuf.c +++ b/cpukit/libblock/src/bdbuf.c @@ -28,8 +28,7 @@ #define BLKDEV_FATAL_BDBUF_SWAPOUT BLKDEV_FATAL_ERROR(2) -#define SWAPOUT_PRIORITY 15 -#define SWAPOUT_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2) +#define SWAPOUT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2) #define READ_MULTIPLE @@ -863,9 +862,11 @@ rtems_bdbuf_init(rtems_bdbuf_config *conf_table, int size) /* Create and start swapout task */ rc = rtems_task_create( - rtems_build_name('B', 'S', 'W', 'P'), - SWAPOUT_PRIORITY, - SWAPOUT_STACK_SIZE, + rtems_build_name('B', 'S', 'W', 'P'), + ((swapout_task_priority > 0) + ? swapout_task_priority + : SWAPOUT_TASK_DEFAULT_PRIORITY), + SWAPOUT_TASK_STACK_SIZE, RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, RTEMS_DEFAULT_ATTRIBUTES, &bd_ctx.swapout_task); |