Changeset 36db134 in rtems-libbsd


Ignore:
Timestamp:
Jan 11, 2017, 1:01:17 PM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
freebsd-9.3
Parents:
b1ec3c9
git-author:
Sebastian Huber <sebastian.huber@…> (01/11/17 13:01:17)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/11/17 13:02:49)
Message:

rtems-bsd-mutex: Add SMP lock debug support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtemsbsd/include/machine/rtems-bsd-muteximpl.h

    rb1ec3c9 r36db134  
    99
    1010/*
    11  * Copyright (c) 2014, 2016 embedded brains GmbH.  All rights reserved.
     11 * Copyright (c) 2014, 2017 embedded brains GmbH.  All rights reserved.
    1212 *
    1313 *  embedded brains GmbH
     
    8686        _Thread_queue_Queue_acquire_critical(&m->queue.Queue,
    8787            &m->queue.Lock_stats, &queue_context->Lock_context.Lock_context);
     88#if defined(RTEMS_SMP) && defined(RTEMS_DEBUG)
     89        m->queue.owner = _SMP_lock_Who_am_I();
     90#endif
    8891}
    8992
     
    9396{
    9497
     98#if defined(RTEMS_SMP) && defined(RTEMS_DEBUG)
     99        _Assert( _Thread_queue_Is_lock_owner( &m->queue ) );
     100        m->queue.owner = SMP_LOCK_NO_OWNER;
     101#endif
    95102        _Thread_queue_Queue_release_critical(&m->queue.Queue,
    96103            &queue_context->Lock_context.Lock_context);
Note: See TracChangeset for help on using the changeset viewer.