[Bug 1910] An option for architecture-specific SMP locks

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Fri Oct 28 16:15:53 UTC 2011


https://www.rtems.org/bugzilla/show_bug.cgi?id=1910

Sebastian Huber <sebastian.huber at embedded-brains.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sebastian.huber at embedded-br
                   |                            |ains.de

--- Comment #4 from Sebastian Huber <sebastian.huber at embedded-brains.de> 2011-10-28 11:15:53 CDT ---
On FreeBSD it is uintptr_t.  They store also various flags:

/*
 * State bits kept in mutex->mtx_lock, for the DEFAULT lock type. None of this,
 * with the exception of MTX_UNOWNED, applies to spin locks.
 */
#define    MTX_RECURSED    0x00000001    /* lock recursed (for MTX_DEF only) */
#define    MTX_CONTESTED    0x00000002    /* lock contested (for MTX_DEF only)
*/
#define MTX_UNOWNED    0x00000004    /* Cookie for free mutex */
#define    MTX_FLAGMASK    (MTX_RECURSED | MTX_CONTESTED | MTX_UNOWNED)

/*
 * Value stored in mutex->mtx_lock to denote a destroyed mutex.
 */
#define    MTX_DESTROYED    (MTX_CONTESTED | MTX_UNOWNED)

I would choose int since this is the natural word size for the architecture.

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list