Changeset 3f23fcd in rtems-libbsd


Ignore:
Timestamp:
Nov 16, 2017, 7:15:37 AM (19 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
eeb3fd5d9b07ac9a2e280cff60a1b762bd273a8d, 1e989998de954bef51e6c19cc3d64d39f32100aa
Children:
344b8e6
Parents:
9c1490a
Message:

LOCKING(9): Remove dead code (KDTRACE_HOOKS)

Location:
rtemsbsd/rtems
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • rtemsbsd/rtems/rtems-kernel-mutex.c

    r9c1490a r3f23fcd  
    5151static void     assert_mtx(const struct lock_object *lock, int what);
    5252static void     lock_mtx(struct lock_object *lock, uintptr_t how);
    53 #ifdef KDTRACE_HOOKS
    54 static int      owner_mtx(const struct lock_object *lock,
    55                     struct thread **owner);
    56 #endif
    5753static uintptr_t unlock_mtx(struct lock_object *lock);
    5854
     
    6965        .lc_lock = lock_mtx,
    7066        .lc_unlock = unlock_mtx,
    71 #ifdef KDTRACE_HOOKS
    72         .lc_owner = owner_mtx,
    73 #endif
    7467};
    7568
     
    8376        .lc_lock = lock_mtx,
    8477        .lc_unlock = unlock_mtx,
    85 #ifdef KDTRACE_HOOKS
    86         .lc_owner = owner_mtx,
    87 #endif
    8878};
    8979
     
    111101        return (0);
    112102}
    113 
    114 #ifdef KDTRACE_HOOKS
    115 int
    116 owner_mtx(struct lock_object *lock, struct thread **owner)
    117 {
    118   struct mtx *m = (struct mtx *)lock;
    119 
    120   *owner = mtx_owner(m);
    121   return (mtx_unowned(m) == 0);
    122 }
    123 #endif
    124103
    125104void
  • rtemsbsd/rtems/rtems-kernel-rwlock.c

    r9c1490a r3f23fcd  
    6161static void     assert_rw(const struct lock_object *lock, int what);
    6262static void     lock_rw(struct lock_object *lock, uintptr_t how);
    63 #ifdef KDTRACE_HOOKS
    64 static int      owner_rw(const struct lock_object *lock, struct thread **owner);
    65 #endif
    6663static uintptr_t unlock_rw(struct lock_object *lock);
    6764
     
    7572        .lc_lock = lock_rw,
    7673        .lc_unlock = unlock_rw,
    77 #ifdef KDTRACE_HOOKS
    78         .lc_owner = owner_rw,
    79 #endif
    8074};
    8175
     
    10599        return (0);
    106100}
    107 
    108 #ifdef KDTRACE_HOOKS
    109 int
    110 owner_rw(struct lock_object *lock, struct thread **owner)
    111 {
    112   struct rwlock *rw = (struct rwlock *)lock;
    113   uintptr_t x = rw->rw_lock;
    114 
    115   *owner = rw_wowner(rw);
    116   return ((x & RW_LOCK_READ) != 0 ?  (RW_READERS(x) != 0) :
    117       (*owner != NULL));
    118 }
    119 #endif
    120101
    121102void
  • rtemsbsd/rtems/rtems-kernel-sx.c

    r9c1490a r3f23fcd  
    5050static void     assert_sx(const struct lock_object *lock, int what);
    5151static void     lock_sx(struct lock_object *lock, uintptr_t how);
    52 #ifdef KDTRACE_HOOKS
    53 static int      owner_sx(const struct lock_object *lock, struct thread **owner);
    54 #endif
    5552static uintptr_t unlock_sx(struct lock_object *lock);
    5653
     
    6461        .lc_lock = lock_sx,
    6562        .lc_unlock = unlock_sx,
    66 #ifdef KDTRACE_HOOKS
    67         .lc_owner = owner_sx,
    68 #endif
    6963};
    7064
     
    9488        return (0);
    9589}
    96 
    97 #ifdef KDTRACE_HOOKS
    98 int
    99 owner_sx(struct lock_object *lock, struct thread **owner)
    100 {
    101         struct sx *sx = (struct sx *)lock;
    102   uintptr_t x = sx->sx_lock;
    103 
    104         *owner = (struct thread *)SX_OWNER(x);
    105         return ((x & SX_LOCK_SHARED) != 0 ? (SX_SHARERS(x) != 0) :
    106       (*owner != NULL));
    107 }
    108 #endif
    10990
    11091void
Note: See TracChangeset for help on using the changeset viewer.