linux/lib/closure.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Asynchronous refcounty things
 *
 * Copyright 2010, 2011 Kent Overstreet <[email protected]>
 * Copyright 2012 Google, Inc.
 */

#include <linux/closure.h>
#include <linux/debugfs.h>
#include <linux/export.h>
#include <linux/rcupdate.h>
#include <linux/seq_file.h>
#include <linux/sched/debug.h>

static inline void closure_put_after_sub_checks(int flags)
{}

static inline void closure_put_after_sub(struct closure *cl, int flags)
{}

/* For clearing flags with the same atomic op as a put */
void closure_sub(struct closure *cl, int v)
{}
EXPORT_SYMBOL();

/*
 * closure_put - decrement a closure's refcount
 */
void closure_put(struct closure *cl)
{}
EXPORT_SYMBOL();

/*
 * closure_wake_up - wake up all closures on a wait list, without memory barrier
 */
void __closure_wake_up(struct closure_waitlist *wait_list)
{}
EXPORT_SYMBOL();

/**
 * closure_wait - add a closure to a waitlist
 * @waitlist: will own a ref on @cl, which will be released when
 * closure_wake_up() is called on @waitlist.
 * @cl: closure pointer.
 *
 */
bool closure_wait(struct closure_waitlist *waitlist, struct closure *cl)
{}
EXPORT_SYMBOL();

struct closure_syncer {};

static CLOSURE_CALLBACK(closure_sync_fn)
{}

void __sched __closure_sync(struct closure *cl)
{}
EXPORT_SYMBOL();

/*
 * closure_return_sync - finish running a closure, synchronously (i.e. waiting
 * for outstanding get()s to finish) and returning once closure refcount is 0.
 *
 * Unlike closure_sync() this doesn't reinit the ref to 1; subsequent
 * closure_get_not_zero() calls waill fail.
 */
void __sched closure_return_sync(struct closure *cl)
{}
EXPORT_SYMBOL();

int __sched __closure_sync_timeout(struct closure *cl, unsigned long timeout)
{}
EXPORT_SYMBOL();

#ifdef CONFIG_DEBUG_CLOSURES

static LIST_HEAD(closure_list);
static DEFINE_SPINLOCK(closure_list_lock);

void closure_debug_create(struct closure *cl)
{}
EXPORT_SYMBOL();

void closure_debug_destroy(struct closure *cl)
{}
EXPORT_SYMBOL();

static int debug_show(struct seq_file *f, void *data)
{}

DEFINE_SHOW_ATTRIBUTE();

static int __init closure_debug_init(void)
{}
late_initcall()

#endif