Possible bug in _CORE_mutex_Seize()

Phil Torre ptorre at zetron.com
Tue Sep 30 18:12:22 UTC 2003


I'm running now with some of the changes suggested by Till and Joel:

1.	"Paranoia" added to _CORE_mutex_Seize() which checks
	_Thread_Dispatch_disable_level and throws an internal error if
	its nonzero when it shouldn't be.

2.	The reent struct is now allocated from the workspace using
	_Workspace_Allocate() from libc_create_hook rather than the start
	hook.  If _Workspace_Allocate() returns NULL, the create hook
	returns false.

This seems to be working (given several minutes of exhaustive testing),
but I notice a few things:  Since I'm now calling _Workspace_Allocate()
directly, _RTEMS_Allocator_mutex is not being locked.  That should be 
OK, because _Thread_Dispatch_disable_level is nonzero, correct?

-Phil

-- 

=====================================================================
Phil Torre                               phone: 425-820-6363 x234
Design Engineer                          email: ptorre at zetron.com
Switching Systems Group                    fax: 425-820-7031
Zetron, Inc.                               web: http://www.zetron.com


  




More information about the users mailing list