[PATCH rtems 06/14] Flashdev: Make mutex name more generic
berndmoessner80 at gmail.com
berndmoessner80 at gmail.com
Tue Jan 2 20:45:27 UTC 2024
From: Bernd Moessner <berndmoessner80 at gmail.com>
---
cpukit/dev/flash/flashdev.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/cpukit/dev/flash/flashdev.c b/cpukit/dev/flash/flashdev.c
index 8bd3d11246..0020e8d2c1 100644
--- a/cpukit/dev/flash/flashdev.c
+++ b/cpukit/dev/flash/flashdev.c
@@ -34,6 +34,7 @@
#include <errno.h>
#include <fcntl.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -490,7 +491,9 @@ static int rtems_flashdev_do_init(
void ( *destroy )( rtems_flashdev *flash )
)
{
- rtems_recursive_mutex_init( &flash->mutex, "RTEMS_FLASHDEV Flash" );
+ char mtx_name[19];
+ sprintf(mtx_name, "FDEV_MTX_%08x", (unsigned int) flash);
+ rtems_recursive_mutex_init( &flash->mutex, (const char*) &mtx_name);
flash->destroy = destroy;
flash->read = NULL;
flash->write = NULL;
--
2.34.1
More information about the devel
mailing list