~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to include/linux/hrtimer.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno
  • Date: 2011-06-07 12:14:05 UTC
  • mfrom: (43.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110607121405-i3h1rd7nrnd2b73h
Tags: 2.6.39-2
[ Ben Hutchings ]
* [x86] Enable BACKLIGHT_APPLE, replacing BACKLIGHT_MBP_NVIDIA
  (Closes: #627492)
* cgroups: Disable memory resource controller by default. Allow it
  to be enabled using kernel parameter 'cgroup_enable=memory'.
* rt2800usb: Enable support for more USB devices including
  Linksys WUSB600N (Closes: #596626) (this change was accidentally
  omitted from 2.6.39-1)
* [x86] Remove Celeron from list of processors supporting PAE. Most
  'Celeron M' models do not.
* Update debconf template translations:
  - Swedish (Martin Bagge) (Closes: #628932)
  - French (David Prévot) (Closes: #628191)
* aufs: Update for 2.6.39 (Closes: #627837)
* Add stable 2.6.39.1, including:
  - ext4: dont set PageUptodate in ext4_end_bio()
  - pata_cmd64x: fix boot crash on parisc (Closes: #622997, #622745)
  - ext3: Fix fs corruption when make_indexed_dir() fails
  - netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
  - sctp: fix race between sctp_bind_addr_free() and
    sctp_bind_addr_conflict()
  - sctp: fix memory leak of the ASCONF queue when free asoc
  - md/bitmap: fix saving of events_cleared and other state
  - cdc_acm: Fix oops when Droids MuIn LCD is connected
  - cx88: Fix conversion from BKL to fine-grained locks (Closes: #619827)
  - keys: Set cred->user_ns in key_replace_session_keyring (CVE-2011-2184)
  - tmpfs: fix race between truncate and writepage
  - nfs41: Correct offset for LAYOUTCOMMIT
  - xen/mmu: fix a race window causing leave_mm BUG()
  - ext4: fix possible use-after-free in ext4_remove_li_request()
  For the complete list of changes, see:
   http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.39.1
* Bump ABI to 2
* netfilter: Enable IP_SET, IP_SET_BITMAP_IP, IP_SET_BITMAP_IPMAC,
  IP_SET_BITMAP_PORT, IP_SET_HASH_IP, IP_SET_HASH_IPPORT,
  IP_SET_HASH_IPPORTIP, IP_SET_HASH_IPPORTNET, IP_SET_HASH_NET,
  IP_SET_HASH_NETPORT, IP_SET_LIST_SET, NETFILTER_XT_SET as modules
  (Closes: #629401)

[ Aurelien Jarno ]
* [mipsel/loongson-2f] Disable_SCSI_LPFC to workaround GCC ICE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
 * 0x00         inactive
55
55
 * 0x01         enqueued into rbtree
56
56
 * 0x02         callback function running
 
57
 * 0x04         timer is migrated to another cpu
57
58
 *
58
59
 * Special cases:
59
60
 * 0x03         callback function running and enqueued
60
61
 *              (was requeued on another CPU)
61
 
 * 0x09         timer was migrated on CPU hotunplug
 
62
 * 0x05         timer was migrated on CPU hotunplug
 
63
 *
62
64
 * The "callback function running and enqueued" status is only possible on
63
65
 * SMP. It happens for example when a posix timer expired and the callback
64
66
 * queued a signal. Between dropping the lock which protects the posix timer
67
69
 * as otherwise the timer could be removed before the softirq code finishes the
68
70
 * the handling of the timer.
69
71
 *
70
 
 * The HRTIMER_STATE_ENQUEUED bit is always or'ed to the current state to
71
 
 * preserve the HRTIMER_STATE_CALLBACK bit in the above scenario.
 
72
 * The HRTIMER_STATE_ENQUEUED bit is always or'ed to the current state
 
73
 * to preserve the HRTIMER_STATE_CALLBACK in the above scenario. This
 
74
 * also affects HRTIMER_STATE_MIGRATE where the preservation is not
 
75
 * necessary. HRTIMER_STATE_MIGRATE is cleared after the timer is
 
76
 * enqueued on the new cpu.
72
77
 *
73
78
 * All state transitions are protected by cpu_base->lock.
74
79
 */
148
153
#endif
149
154
};
150
155
 
151
 
#define HRTIMER_MAX_CLOCK_BASES 2
 
156
enum  hrtimer_base_type {
 
157
        HRTIMER_BASE_REALTIME,
 
158
        HRTIMER_BASE_MONOTONIC,
 
159
        HRTIMER_BASE_BOOTTIME,
 
160
        HRTIMER_MAX_CLOCK_BASES,
 
161
};
152
162
 
153
163
/*
154
164
 * struct hrtimer_cpu_base - the per cpu clock bases
308
318
 
309
319
extern ktime_t ktime_get(void);
310
320
extern ktime_t ktime_get_real(void);
 
321
extern ktime_t ktime_get_boottime(void);
311
322
 
312
323
 
313
324
DECLARE_PER_CPU(struct tick_device, tick_cpu_device);
370
381
extern ktime_t hrtimer_get_next_event(void);
371
382
 
372
383
/*
373
 
 * A timer is active, when it is enqueued into the rbtree or the callback
374
 
 * function is running.
 
384
 * A timer is active, when it is enqueued into the rbtree or the
 
385
 * callback function is running or it's in the state of being migrated
 
386
 * to another cpu.
375
387
 */
376
388
static inline int hrtimer_active(const struct hrtimer *timer)
377
389
{