Release 4.11 tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/preempt.h
#ifndef PREEMPT_H
#define PREEMPT_H
#include <stdbool.h>
#include "bug_on.h"
/* This flag contains garbage if preempt_disable_count is 0. */
extern __thread int thread_cpu_id;
/* Support recursive preemption disabling. */
extern __thread int preempt_disable_count;
void preempt_disable(void);
void preempt_enable(void);
static inline void preempt_disable_notrace(void)
{
preempt_disable();
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Lance Roy | 12 | 100.00% | 1 | 100.00% |
Total | 12 | 100.00% | 1 | 100.00% |
static inline void preempt_enable_no_resched(void)
{
preempt_enable();
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Lance Roy | 12 | 100.00% | 1 | 100.00% |
Total | 12 | 100.00% | 1 | 100.00% |
static inline void preempt_enable_notrace(void)
{
preempt_enable();
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Lance Roy | 12 | 100.00% | 1 | 100.00% |
Total | 12 | 100.00% | 1 | 100.00% |
static inline int preempt_count(void)
{
return preempt_disable_count;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Lance Roy | 12 | 100.00% | 1 | 100.00% |
Total | 12 | 100.00% | 1 | 100.00% |
static inline bool preemptible(void)
{
return !preempt_count();
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Lance Roy | 14 | 100.00% | 1 | 100.00% |
Total | 14 | 100.00% | 1 | 100.00% |
static inline int get_cpu(void)
{
preempt_disable();
return thread_cpu_id;
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Lance Roy | 15 | 100.00% | 1 | 100.00% |
Total | 15 | 100.00% | 1 | 100.00% |
static inline void put_cpu(void)
{
preempt_enable();
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Lance Roy | 12 | 100.00% | 1 | 100.00% |
Total | 12 | 100.00% | 1 | 100.00% |
static inline void might_sleep(void)
{
BUG_ON(preempt_disable_count);
}
Contributors
Person | Tokens | Prop | Commits | CommitProp |
Lance Roy | 14 | 100.00% | 1 | 100.00% |
Total | 14 | 100.00% | 1 | 100.00% |
#endif
Overall Contributors
Person | Tokens | Prop | Commits | CommitProp |
Lance Roy | 141 | 100.00% | 1 | 100.00% |
Total | 141 | 100.00% | 1 | 100.00% |
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.