From 796967c3df40a51a9028bc83d1a4b6dbeae07c3f Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 28 Feb 2012 17:19:49 +0100 Subject: libblock: Change bdbuf API The functions o rtems_bdbuf_get(), o rtems_bdbuf_read(), o rtems_bdbuf_syncdev(), and o rtems_bdbuf_purge_dev(), use now the disk device instead of the device identifier. This makes bdbuf independent of rtems_disk_obtain() and rtems_disk_release(). It is the responsiblity of the file system to obtain the disk device. This also reduces the overhead to get a buffer. The key for the AVL tree uses now the disk device instead of the device identifier. The pointer is interpreted as an unsigned integer. This reduces the memory overhead and makes the comparison operation a bit faster. Removed function rtems_bdbuf_purge_major(). This function was too destructive and could have unpredictable side effects. --- testsuites/libtests/block08/bdbuf_test1_4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'testsuites/libtests/block08/bdbuf_test1_4.c') diff --git a/testsuites/libtests/block08/bdbuf_test1_4.c b/testsuites/libtests/block08/bdbuf_test1_4.c index b7a4b0c399..4d6e02835d 100644 --- a/testsuites/libtests/block08/bdbuf_test1_4.c +++ b/testsuites/libtests/block08/bdbuf_test1_4.c @@ -125,7 +125,7 @@ bdbuf_test1_4_thread1(rtems_task_argument arg) * date transfer, and as the result this call * will return valid buffer. */ - rc = rtems_bdbuf_read(test_dev, TEST_BLK_NUM, &bd); + rc = rtems_bdbuf_read(test_dd, TEST_BLK_NUM, &bd); if (rc != RTEMS_SUCCESSFUL) { TEST_FAILED(); @@ -161,7 +161,7 @@ bdbuf_test1_4_thread2(rtems_task_argument arg) * On step 4 thread #1 releases buffer and as the result * our read operation should finish with success. */ - rc = rtems_bdbuf_read(test_dev, TEST_BLK_NUM, &bd); + rc = rtems_bdbuf_read(test_dd, TEST_BLK_NUM, &bd); if (rc != RTEMS_SUCCESSFUL) { TEST_FAILED(); -- cgit v1.2.3