History

ptp: introduce ptp_cancel_worker_sync

In order to effectively use the PTP kernel thread for tasks such as timestamping packets, allow the user control over stopping it, which is needed e.g. when the timestamping queues must be drained.

Vladimir Oltean committed 6 years ago

Commit 544fed41 parent db99d512 files · +15 −0Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/ptp_clock_kernel.h+9−0
@@ -243,6 +243,13 @@ int ptp_find_pin(struct ptp_clock *ptp, · 242 unmodified lines
243 243
244int ptp_schedule_worker(struct ptp_clock *ptp, unsigned long delay);244int ptp_schedule_worker(struct ptp_clock *ptp, unsigned long delay);
245 245
246/**
247 * ptp_cancel_worker_sync() - cancel ptp auxiliary clock
248 *
249 * @ptp: The clock obtained from ptp_clock_register().
250 */
251void ptp_cancel_worker_sync(struct ptp_clock *ptp);
252
246#else253#else
247static inline struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,254static inline struct ptp_clock *ptp_clock_register(struct ptp_clock_info *info,
248 struct device *parent)255 struct device *parent)
@@ -260,6 +267,8 @@ static inline int ptp_find_pin(struct ptp_clock *ptp, · 11 unmodified lines
260static inline int ptp_schedule_worker(struct ptp_clock *ptp,267static inline int ptp_schedule_worker(struct ptp_clock *ptp,
261 unsigned long delay)268 unsigned long delay)
262{ return -EOPNOTSUPP; }269{ return -EOPNOTSUPP; }
270static inline void ptp_cancel_worker_sync(struct ptp_clock *ptp)
271{ }
263 272
264#endif273#endif
265 274