2 /*--------------------------------------------------------------------*/
3 /*--- Private scheduler lock header. priv_sched-lock-impl.h ---*/
5 /*--- Scheduler lock implementation details. ---*/
6 /*--------------------------------------------------------------------*/
9 This file is part of Valgrind, a dynamic binary instrumentation
12 Copyright (C) 2011-2017 Bart Van Assche <bvanassche@acm.org>.
14 This program is free software; you can redistribute it and/or
15 modify it under the terms of the GNU General Public License as
16 published by the Free Software Foundation; either version 2 of the
17 License, or (at your option) any later version.
19 This program is distributed in the hope that it will be useful, but
20 WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 General Public License for more details.
24 You should have received a copy of the GNU General Public License
25 along with this program; if not, see <http://www.gnu.org/licenses/>.
27 The GNU General Public License is contained in the file COPYING.
30 #ifndef __PRIV_SCHED_LOCK_IMPL_H
31 #define __PRIV_SCHED_LOCK_IMPL_H
33 #include "pub_core_basics.h" // HChar
35 struct sched_lock_ops
{
36 const HChar
*(*get_sched_lock_name
)(void);
37 struct sched_lock
*(*create_sched_lock
)(void);
38 void (*destroy_sched_lock
)(struct sched_lock
*p
);
39 int (*get_sched_lock_owner
)(struct sched_lock
*p
);
40 void (*acquire_sched_lock
)(struct sched_lock
*p
);
41 void (*release_sched_lock
)(struct sched_lock
*p
);
44 extern const struct sched_lock_ops
ML_(generic_sched_lock_ops
);
45 extern const struct sched_lock_ops
ML_(linux_ticket_lock_ops
);
47 #endif // __PRIV_SCHED_LOCK_IMPL_H
49 /*--------------------------------------------------------------------*/
51 /*--------------------------------------------------------------------*/