Convert most of the stub macros in timer.h and workqueue.h to static
inline functions for better type checking. Keep macros for functions
that take callback pointers (setup_timer, timer_setup, INIT_WORK,
INIT_DELAYED_WORK, del_timer_sync) since some callers pass functions
that are conditionally compiled out.
Fixes: 3b4667ed88 ("ext4l: Add super.c to build")
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
83 lines
1.7 KiB
C
83 lines
1.7 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* workqueue.h --- work queue handling for Linux.
|
|
*
|
|
* Stub definitions for Linux kernel workqueue support.
|
|
* U-Boot doesn't use workqueues.
|
|
*/
|
|
#ifndef _LINUX_WORKQUEUE_H
|
|
#define _LINUX_WORKQUEUE_H
|
|
|
|
struct work_struct {
|
|
void (*func)(struct work_struct *);
|
|
};
|
|
|
|
struct delayed_work {
|
|
struct work_struct work;
|
|
};
|
|
|
|
struct workqueue_struct;
|
|
|
|
/* Use macros for functions taking callback pointers to avoid requiring
|
|
* the callback to be declared (some callers have them in #ifdef blocks)
|
|
*/
|
|
#define INIT_WORK(work, func) do { } while (0)
|
|
#define INIT_DELAYED_WORK(work, func) do { } while (0)
|
|
|
|
static inline void schedule_work(struct work_struct *work)
|
|
{
|
|
}
|
|
|
|
static inline int schedule_delayed_work(struct delayed_work *work,
|
|
unsigned long delay)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline int cancel_work_sync(struct work_struct *work)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline int cancel_delayed_work(struct delayed_work *work)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline int cancel_delayed_work_sync(struct delayed_work *work)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline int flush_work(struct work_struct *work)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline int flush_delayed_work(struct delayed_work *work)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline int queue_work(struct workqueue_struct *wq,
|
|
struct work_struct *work)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
static inline int queue_delayed_work(struct workqueue_struct *wq,
|
|
struct delayed_work *work,
|
|
unsigned long delay)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
#define alloc_workqueue(fmt, flags, max, ...) ((struct workqueue_struct *)1)
|
|
#define create_singlethread_workqueue(name) ((struct workqueue_struct *)1)
|
|
|
|
static inline void destroy_workqueue(struct workqueue_struct *wq)
|
|
{
|
|
}
|
|
|
|
#endif /* _LINUX_WORKQUEUE_H */
|