diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2010-12-02 12:49:00 +0000 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2010-12-02 12:49:00 +0000 |
commit | 2610f0b28d31a6fd19c271f229189c68d14ad54f (patch) | |
tree | c57644d4e8f2fee16b6e11202109effa03b2f765 /tools/libxc/xenctrl.h | |
parent | 0bba6abe9863fabeae156b2361e531dac5afd93d (diff) | |
download | xen-2610f0b28d31a6fd19c271f229189c68d14ad54f.tar.gz xen-2610f0b28d31a6fd19c271f229189c68d14ad54f.tar.bz2 xen-2610f0b28d31a6fd19c271f229189c68d14ad54f.zip |
libxc: allow caller to specify no re-entrancy protection when opening the interface
Used by language bindings which provide their own re-entrancy which conflicts
with pthreads.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
committer: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'tools/libxc/xenctrl.h')
-rw-r--r-- | tools/libxc/xenctrl.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h index 915410ac3a..48e7215310 100644 --- a/tools/libxc/xenctrl.h +++ b/tools/libxc/xenctrl.h @@ -132,8 +132,17 @@ xc_interface *xc_interface_open(xentoollog_logger *logger, * if dombuild_logger=NULL, will log to a file */ +/* + * Note: if XC_OPENFLAG_NON_REENTRANT is passed then libxc must not be + * called reentrantly and the calling application is responsible for + * providing mutual exclusion surrounding all libxc calls itself. + * + * In particular xc_{get,clear}_last_error only remain valid for the + * duration of the critical section containing the call which failed. + */ enum xc_open_flags { - XC_OPENFLAG_DUMMY = 01, /* do not actually open a xenctrl interface */ + XC_OPENFLAG_DUMMY = 1<<0, /* do not actually open a xenctrl interface */ + XC_OPENFLAG_NON_REENTRANT = 1<<1, /* assume library is only every called from a single thread */ }; /** |