File: cleanup.h

package info (click to toggle)
ploop 1.15-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,372 kB
  • sloc: ansic: 16,133; sh: 413; makefile: 222; python: 144
file content (29 lines) | stat: -rw-r--r-- 520 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef __CLEANUP_H__
#define __CLEANUP_H__

#include "list.h"

struct ploop_cancel_handle
{
	list_head_t head;
	int flags;
};

typedef void (* cleanup_FN) (void *data);

struct ploop_cleanup_hook {
	list_elem_t list;
	cleanup_FN fn;
	void *data;
};

#ifdef __cplusplus
extern "C" {
#endif
struct ploop_cancel_handle *ploop_get_cancel_handle(void);
struct ploop_cleanup_hook *register_cleanup_hook(cleanup_FN f, void *data);
void unregister_cleanup_hook(struct ploop_cleanup_hook *h);
#ifdef __cplusplus
}
#endif
#endif