Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242652
b: refs/heads/master
c: ef352e7
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Mar 24, 2011
1 parent 5594de9 commit c2af4d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8c64b4cc0201cf05b218ea3271a2abb4f86acb7b
refs/heads/master: ef352e7cdf714596f51ad18809404edeaa50e8fd
8 changes: 4 additions & 4 deletions trunk/include/net/sch_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ struct qdisc_rate_table {
enum qdisc_state_t {
__QDISC_STATE_SCHED,
__QDISC_STATE_DEACTIVATED,
__QDISC_STATE_THROTTLED,
};

/*
* following bits are only changed while qdisc lock is held
*/
enum qdisc___state_t {
__QDISC___STATE_RUNNING = 1,
__QDISC___STATE_THROTTLED = 2,
};

struct qdisc_size_table {
Expand Down Expand Up @@ -106,17 +106,17 @@ static inline void qdisc_run_end(struct Qdisc *qdisc)

static inline bool qdisc_is_throttled(const struct Qdisc *qdisc)
{
return (qdisc->__state & __QDISC___STATE_THROTTLED) ? true : false;
return test_bit(__QDISC_STATE_THROTTLED, &qdisc->state) ? true : false;
}

static inline void qdisc_throttled(struct Qdisc *qdisc)
{
qdisc->__state |= __QDISC___STATE_THROTTLED;
set_bit(__QDISC_STATE_THROTTLED, &qdisc->state);
}

static inline void qdisc_unthrottled(struct Qdisc *qdisc)
{
qdisc->__state &= ~__QDISC___STATE_THROTTLED;
clear_bit(__QDISC_STATE_THROTTLED, &qdisc->state);
}

struct Qdisc_class_ops {
Expand Down

0 comments on commit c2af4d5

Please sign in to comment.