Changeset f11bfc2 in rtems-libbsd


Ignore:
Timestamp:
Jan 11, 2017, 1:01:17 PM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
b96abfd647154f10ea8f7fac68e25676636eded5, 7f47f2784138109b8363804c2aecd3d83231ab0f, f1f03620800b14146977d78fb4322d80da04b53a, 90a9fd66e0a85d8520bbb4bbcb72bfd274965961
Children:
fb288fa
Parents:
e5ef01e
git-author:
Sebastian Huber <sebastian.huber@…> (01/11/17 13:01:17)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/11/17 13:01:58)
Message:

rtems-bsd-mutex: Add SMP lock debug support

File:
1 edited

Legend:

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

    re5ef01e rf11bfc2  
    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.