1 Index: pkg/l4sys/include/thread
2 ===================================================================
3 --- pkg/l4sys/include/thread (revision 42489)
4 +++ pkg/l4sys/include/thread (working copy)
7 l4_msgtag_t register_del_irq(Cap<Irq> irq, l4_utcb_t *u = l4_utcb()) throw()
8 { return l4_thread_register_del_irq_u(cap(), irq.cap(), u); }
11 + * \brief Setup watchdog with performance counter.
12 + * \param utcb the UTCB of the current thread.
15 + l4_msgtag_t watchdog_enable(Cap<Irq> irq, l4_utcb_t *utcb = l4_utcb()) throw()
16 + { return l4_thread_watchdog_enable_u(cap(), irq.cap(), utcb); }
19 + * \brief Manage watchdog with performance counter.
20 + * \param utcb the UTCB of the current thread.
23 + l4_msgtag_t watchdog_control(l4_utcb_t *utcb = l4_utcb()) throw()
24 + { return l4_thread_watchdog_control_u(cap(), utcb); }
27 * \brief Wrapper class for modifying senders.
28 Index: pkg/l4sys/include/thread.h
29 ===================================================================
30 --- pkg/l4sys/include/thread.h (revision 42489)
31 +++ pkg/l4sys/include/thread.h (working copy)
34 l4_thread_stats_time_u(l4_cap_idx_t thread, l4_utcb_t *utcb) L4_NOTHROW;
37 + * \brief Setup watchdog with performance counter.
38 + * \ingroup l4_thread_api
39 + * \param thread Thread for whom the watchdog shall be enabled.
42 +L4_INLINE l4_msgtag_t
43 +l4_thread_watchdog_enable(l4_cap_idx_t thread, l4_cap_idx_t irq) L4_NOTHROW;
47 + * \ingroup l4_thread_api
49 +L4_INLINE l4_msgtag_t
50 +l4_thread_watchdog_enable_u(l4_cap_idx_t thread, l4_cap_idx_t irq, l4_utcb_t *utcb) L4_NOTHROW;
53 + * \brief Manage watchdog with performance counter.
54 + * \ingroup l4_thread_api
55 + * \param thread Thread for whom the watchdog shall be managed.
58 +L4_INLINE l4_msgtag_t
59 +l4_thread_watchdog_control(l4_cap_idx_t thread) L4_NOTHROW;
63 + * \ingroup l4_thread_api
65 +L4_INLINE l4_msgtag_t
66 +l4_thread_watchdog_control_u(l4_cap_idx_t thread, l4_utcb_t *utcb) L4_NOTHROW;
69 * \brief vCPU return from event handler.
70 * \ingroup l4_thread_api
73 L4_THREAD_REGISTER_DELETE_IRQ_OP = 5UL, /**< Register an IPC-gate deletion IRQ */
74 L4_THREAD_MODIFY_SENDER_OP = 6UL, /**< Modify all senders IDs that match the given pattern */
75 L4_THREAD_VCPU_CONTROL_OP = 7UL, /**< Enable / disable VCPU feature */
76 + L4_THREAD_WATCHDOG_ENABLE_OP = 8UL, /**< Enable watchdog with performance counter */
77 + L4_THREAD_WATCHDOG_CONTROL_OP = 9UL, /**< Manage watchdog with performance counter */
78 L4_THREAD_VCPU_CONTROL_EXT_OP = L4_THREAD_VCPU_CONTROL_OP | 0x10000,
79 L4_THREAD_GDT_X86_OP = 0x10UL, /**< Gdt */
80 L4_THREAD_SET_FS_AMD64_OP = 0x12UL, /**< Set FS/TLS */
82 return l4_thread_ex_regs_ret_u(thread, ip, sp, flags, l4_utcb());
85 +L4_INLINE l4_msgtag_t
86 +l4_thread_watchdog_enable(l4_cap_idx_t thread, l4_cap_idx_t irq) L4_NOTHROW
87 +{ return l4_thread_watchdog_enable_u(thread, irq, l4_utcb()); }
89 +L4_INLINE l4_msgtag_t
90 +l4_thread_watchdog_enable_u(l4_cap_idx_t thread, l4_cap_idx_t irq, l4_utcb_t *utcb) L4_NOTHROW
92 + l4_msg_regs_t *v = l4_utcb_mr_u(utcb);
93 + v->mr[0] = L4_THREAD_WATCHDOG_ENABLE_OP;
94 + v->mr[1] = l4_map_obj_control(0,0);
95 + v->mr[2] = l4_obj_fpage(irq, 0, L4_CAP_FPAGE_RWS).raw;
96 + return l4_ipc_call(thread, utcb, l4_msgtag(L4_PROTO_THREAD, 1, 1, 0), L4_IPC_NEVER);
99 +L4_INLINE l4_msgtag_t
100 +l4_thread_watchdog_control(l4_cap_idx_t thread) L4_NOTHROW
101 +{ return l4_thread_watchdog_control_u(thread, l4_utcb()); }
103 +L4_INLINE l4_msgtag_t
104 +l4_thread_watchdog_control_u(l4_cap_idx_t thread, l4_utcb_t *utcb) L4_NOTHROW
106 + l4_msg_regs_t *v = l4_utcb_mr_u(utcb);
107 + v->mr[0] = L4_THREAD_WATCHDOG_CONTROL_OP;
108 + return l4_ipc_call(thread, utcb, l4_msgtag(L4_PROTO_THREAD, 1, 0, 0), L4_IPC_NEVER);
112 l4_thread_control_start(void) L4_NOTHROW