<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 4, 2024 at 12:35 PM <<a href="mailto:berndmoessner80@gmail.com">berndmoessner80@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">From: Bernd Moessner <<a href="mailto:berndmoessner80@gmail.com" target="_blank">berndmoessner80@gmail.com</a>><br>
<br>
---<br>
cpukit/dev/flash/flashdev.c | 5 ++++-<br>
1 file changed, 4 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/cpukit/dev/flash/flashdev.c b/cpukit/dev/flash/flashdev.c<br>
index 8bd3d11246..0020e8d2c1 100644<br>
--- a/cpukit/dev/flash/flashdev.c<br>
+++ b/cpukit/dev/flash/flashdev.c<br>
@@ -34,6 +34,7 @@<br>
<br>
#include <errno.h><br>
#include <fcntl.h><br>
+#include <stdio.h><br>
#include <stdlib.h><br>
#include <string.h><br>
#include <unistd.h><br>
@@ -490,7 +491,9 @@ static int rtems_flashdev_do_init(<br>
void ( *destroy )( rtems_flashdev *flash )<br>
)<br>
{<br>
- rtems_recursive_mutex_init( &flash->mutex, "RTEMS_FLASHDEV Flash" );<br>
+ char mtx_name[19];<br>
+ sprintf(mtx_name, "FDEV_MTX_%08x", (unsigned int) flash);<br>
+ rtems_recursive_mutex_init( &flash->mutex, (const char*) &mtx_name);<br></blockquote><div><br></div><div><div>None of the other uses of mutexes in cpukit differentiate between
various instantiations and the information you've added here is already
available if you know the mutex address and know that it's a flash
mutex.</div><div><br></div><div>Is there a reason this needs to differentiate between the various instances where others don't?</div><div><br></div><div>Kinsey</div> </div></div></div>