2009-07-29 Joel Sherrill <joel.sherrill@oarcorp.com>

* posix/src/mqueuedeletesupp.c: Mark unreachable section as
	RTEMS_DEBUG.
This commit is contained in:
Joel Sherrill
2009-07-29 20:26:42 +00:00
parent 330e858cc2
commit 59efe76bbf
2 changed files with 21 additions and 4 deletions
+5
View File
@@ -1,3 +1,8 @@
2009-07-29 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/src/mqueuedeletesupp.c: Mark unreachable section as
RTEMS_DEBUG.
2009-07-29 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/killinfo.c: Add _Thread_Enable_dispatch() on EAGAIN
+16 -4
View File
@@ -11,7 +11,7 @@
* This code ignores the O_RDONLY/O_WRONLY/O_RDWR flag at open
* time.
*
* COPYRIGHT (c) 1989-2007.
* COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -39,6 +39,9 @@
#include <rtems/seterr.h>
#include <rtems/posix/mqueue.h>
#include <rtems/posix/time.h>
#if defined(RTEMS_DEBUG)
#include <rtems/bspIo.h>
#endif
/*PAGE
*
@@ -50,11 +53,20 @@ void _POSIX_Message_queue_Delete(
)
{
if ( !the_mq->linked && !the_mq->open_count ) {
/* the name memory may have been freed by unlink. */
Objects_Control *the_object = &the_mq->Object;
if ( the_object->name.name_p )
_Workspace_Free( (void *)the_object->name.name_p );
#if defined(RTEMS_DEBUG)
/*
* the name memory will have been freed by unlink.
*/
if ( the_object->name.name_p ) {
printk(
"POSIX MQ name (%p) not freed by unlink\n",
(void *)the_object->name.name_p
);
_Workspace_Free( (void *)the_object->name.name_p );
}
#endif
_Objects_Close( &_POSIX_Message_queue_Information, the_object );