Displaying 20 results from an estimated 29 matches for "callback_fn".
2019 Jul 16
1
[libnbd PATCH] generator: Prefer closure opaque after function pointer in C
...debug;
- void *debug_data;
int (*debug_fn) (void *, const char *, const char *);
+ void *debug_data;
/* Linked list of close callbacks. */
struct close_callback *close_callbacks;
@@ -249,12 +249,12 @@ typedef int (*read_fn) (void *user_data, const void *buf, size_t count,
typedef int (*callback_fn) (void *user_data, int64_t cookie, int *error);
struct command_cb {
- void *user_data;
union {
extent_fn extent;
read_fn read;
} fn;
callback_fn callback;
+ void *user_data;
};
struct command_in_flight {
diff --git a/lib/rw.c b/lib/rw.c
index f2fe4e0..d32f0dc 100644
--- a/...
2019 Jul 16
2
[PATCH libnbd] generator: Define new Closure type
** INCOMPLETE **
This is the generator change as discussed on the list already.
The Python and OCaml bindings are not yet done.
It passes all [C only] tests and valgrind.
Note that nbd_add_close_callback is inconsistent with other closure
types because it passes the user_data parameter after the function.
(This is not caused by the current patch, it was already
inconsistent). We decided that
2019 Aug 03
1
[PATCH libnbd] generator: Generate typedefs automatically for Closure arguments.
...int64_t offset,
- uint32_t *entries, size_t nr_entries, int *error);
-typedef int (*read_fn) (unsigned valid_flag, void *user_data,
- const void *buf, size_t count,
- uint64_t offset, unsigned status, int *error);
-typedef int (*callback_fn) (unsigned valid_flag, void *user_data,
- int *error);
-
struct command_cb {
union {
- extent_fn extent;
- read_fn read;
+ nbd_extent_callback extent;
+ nbd_chunk_callback chunk;
} fn;
void *fn_user_data; /* associated with one of the fn callbacks ab...
2014 Jun 30
3
[LLVMdev] LLD dynamic compilation
...gt;registerObserver([&](File *file) {
files.push_back(file->path()); });
(gdb) bt
#0 operator() (file=<optimized out>, __closure=0x7fffffffde40) at
/home/rengolin/devel/llvm/src/llvm/tools/lld/unittests/DriverTests/InputGraphTest.cpp:197
#1 llvm::function_ref<void(lld::File*)>::callback_fn<InputGraphTest_Observer_Test::TestBody()::<lambda(lld::File*)>
>(intptr_t, lld::File *) (callable=140737488346688,
param1=<optimized out>) at
/home/rengolin/devel/llvm/src/llvm/include/llvm/ADT/STLExtras.h:117
#2 0x00000000005b3ec4 in operator() (param1=<optimized out>,...
2019 Jul 16
0
[PATCH libnbd v2] generator: Define new Closure type instead of callbacks.
...uint32_t *entries, size_t nr_entries, int *error);
-typedef int (*read_fn) (void *data, const void *buf, size_t count,
+typedef int (*read_fn) (void *user_data, const void *buf, size_t count,
uint64_t offset, int status, int *error);
-typedef int (*callback_fn) (void *data, int64_t cookie, int *error);
+typedef int (*callback_fn) (void *user_data, int64_t cookie, int *error);
struct command_cb {
- void *opaque;
+ void *user_data;
union {
extent_fn extent;
read_fn read;
diff --git a/lib/rw.c b/lib/rw.c
index a878fea..f2fe4e0 100644
--- a...
2019 Jul 16
2
[PATCH libnbd v2] generator: Define new Closure type
As before, but this one has working Python bindings. OCaml still TBD.
Rich.
2014 Jun 30
2
[LLVMdev] LLD dynamic compilation
Folks,
I'm having a look at LLD and I need some guidance...
I know it's not production ready for x86 and ARM (the idea is to make
it so). My steps:
I've added it to tools/lld and ran CMake again (on x86_64) on a
standard release build (static linking). It works, builds but I see
one unit test error:
Note: Google Test filter = InputGraphTest.Observer
[==========] Running 1 test from
2019 Jul 24
0
[PATCH libnbd 1/3] generator: Change Closure so it describes single callbacks.
...t;error == 0)
diff --git a/lib/internal.h b/lib/internal.h
index 3f2d3f8..b2a65bc 100644
--- a/lib/internal.h
+++ b/lib/internal.h
@@ -269,8 +269,9 @@ struct command_cb {
extent_fn extent;
read_fn read;
} fn;
+ void *fn_user_data; /* associated with one of the fn callbacks above */
callback_fn callback;
- void *user_data;
+ void *user_data; /* associated with the callback function */
};
struct command {
diff --git a/lib/rw.c b/lib/rw.c
index 680b81a..7999a86 100644
--- a/lib/rw.c
+++ b/lib/rw.c
@@ -280,18 +280,24 @@ nbd_unlocked_aio_pread_structured (struct nbd_handle *h, void *buf...
2017 Feb 01
15
[PATCH 00/14] hyperv: vmbus related patches
This is a rebase/resend of earlier patches. I skipped the pure
cosmetic patches for now. Mostly this is consolidation earlier
changes, removing dead code etc. The important part is the
change for allowing a vmbus channel to get callback directly
in interrupt mode; this is necessary for NAPI support.
Stephen Hemminger (14):
vmbus: use kernel bitops for traversing interrupt mask
vmbus: drop
2017 Feb 01
15
[PATCH 00/14] hyperv: vmbus related patches
This is a rebase/resend of earlier patches. I skipped the pure
cosmetic patches for now. Mostly this is consolidation earlier
changes, removing dead code etc. The important part is the
change for allowing a vmbus channel to get callback directly
in interrupt mode; this is necessary for NAPI support.
Stephen Hemminger (14):
vmbus: use kernel bitops for traversing interrupt mask
vmbus: drop
2019 Jul 16
1
Re: [PATCH libnbd v2] generator: Define new Closure type instead of callbacks.
...uint32_t *entries, size_t nr_entries, int *error);
> -typedef int (*read_fn) (void *data, const void *buf, size_t count,
> +typedef int (*read_fn) (void *user_data, const void *buf, size_t count,
> uint64_t offset, int status, int *error);
> -typedef int (*callback_fn) (void *data, int64_t cookie, int *error);
> +typedef int (*callback_fn) (void *user_data, int64_t cookie, int *error);
>
> struct command_cb {
> - void *opaque;
> + void *user_data;
since none of the renames here are necessitated by the generator
changes, but rather make thing...
2019 Jul 24
8
[PATCH libnbd v2 0/5] lib: Implement closure lifetimes.
v1 was here:
https://www.redhat.com/archives/libguestfs/2019-July/thread.html#00231
The changes address everything that Eric picked up in his review of
the first two patches. I have also added two more patches (4 and 5)
which respectively fix docs and change int status -> unsigned status,
as discussed.
Passes make, check, check-valgrind.
Rich.
2019 Jul 24
0
[PATCH libnbd v2 5/5] lib: Use unsigned for pread_structured status parameter.
...t nr_entries, int *error);
typedef int (*read_fn) (unsigned valid_flag, void *user_data,
const void *buf, size_t count,
- uint64_t offset, int status, int *error);
+ uint64_t offset, unsigned status, int *error);
typedef int (*callback_fn) (unsigned valid_flag, void *user_data,
int64_t cookie, int *error);
diff --git a/tests/oldstyle.c b/tests/oldstyle.c
index cb0d435..95e1c97 100644
--- a/tests/oldstyle.c
+++ b/tests/oldstyle.c
@@ -39,7 +39,7 @@ static const char *progname;
static int
pread_cb (unsi...
2019 Jul 24
6
[PATCH libnbd 0/3] Implement closure lifetimes.
This implements most of what I wrote here:
https://www.redhat.com/archives/libguestfs/2019-July/msg00213.html
2020 Jul 26
2
[LAA] RtCheck on pointers of different address spaces.
...mination::runOnFunction(llvm::Function&)::'lambda'(llvm::Loop&)::operator()(llvm::Loop&) const $SRC/llvm-project/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp:651:53
llvm::LoopAccessInfo const& llvm::function_ref<llvm::LoopAccessInfo const& (llvm::Loop&)>::callback_fn<(anonymous namespace)::LoopLoadElimination::runOnFunction(llvm::Function&)::'lambda'(llvm::Loop&)>(long, llvm::Loop&) $SRC/llvm-project/llvm/include/llvm/ADT/STLExtras.h:185:5
llvm::function_ref<llvm::LoopAccessInfo const& (llvm::Loop&)>::operator()(llvm::Loo...
2020 Aug 10
2
Orc JIT v2 breaks OpenMP in 11.x branch?
...t;::operator()(clang::CodeGen::CodeGenFunction
> &) const (__closure=0x7fffd4fd8340, CGF=...)
> at
> /u/geoff/llvmrepo/llvm-project/clang/lib/CodeGen/CGStmtOpenMP.cpp:3048
> #11 0x00007fb71199754d in
>
> llvm::function_ref<void(clang::CodeGen::CodeGenFunction&)>::callback_fn<clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop(const
> clang::OMPLoopDirective&, clang::Expr*, const CodeGenLoopBoundsTy&,
> const CodeGenDispatchBoundsTy&)::<lambda(clang::CodeGen::CodeGenFunction&)>
> >(intptr_t, clang::CodeGen::CodeGenFunction &)...
2020 Aug 03
2
Orc JIT v2 breaks OpenMP in 11.x branch?
Greetings, Lang and other JITters,
Last week I moved our Orc v2-based app from top-of-tree to the new
11.x branch, and it no longer handles C++ code containing OpenMP
directives correctly.
More specifically, if I JIT compile a function containing OpenMP
parallel/for pragmas, using a release version of LLVM, the code
compiles and seems to work, but if I try to write the module's bitcode
to
2020 Aug 10
2
[EXTERNAL] Re: Orc JIT v2 breaks OpenMP in 11.x branch?
...erator()(clang::CodeGen::CodeGenFunction
>> &) const (__closure=0x7fffd4fd8340, CGF=...)
>> at /u/geoff/llvmrepo/llvm-project/clang/lib/CodeGen/CGStmtOpenMP.cpp:3048
>> #11 0x00007fb71199754d in
>> llvm::function_ref<void(clang::CodeGen::CodeGenFunction&)>::callback_fn<clang::CodeGen::CodeGenFunction::EmitOMPWorksharingLoop(const
>> clang::OMPLoopDirective&, clang::Expr*, const CodeGenLoopBoundsTy&,
>> const CodeGenDispatchBoundsTy&)::<lambda(clang::CodeGen::CodeGenFunction&)>
>> >(intptr_t, clang::CodeGen::CodeGenFun...
2020 Jul 26
2
[LAA] RtCheck on pointers of different address spaces.
...mination::runOnFunction(llvm::Function&)::'lambda'(llvm::Loop&)::operator()(llvm::Loop&) const $SRC/llvm-project/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp:651:53
llvm::LoopAccessInfo const& llvm::function_ref<llvm::LoopAccessInfo const& (llvm::Loop&)>::callback_fn<(anonymous namespace)::LoopLoadElimination::runOnFunction(llvm::Function&)::'lambda'(llvm::Loop&)>(long, llvm::Loop&) $SRC/llvm-project/llvm/include/llvm/ADT/STLExtras.h:185:5
llvm::function_ref<llvm::LoopAccessInfo const& (llvm::Loop&)>::operator()(llvm::Loo...
2019 Jul 24
0
[PATCH libnbd 2/3] lib: Implement closure lifetimes.
...ize_t nr_entries, int *error);
-typedef int (*read_fn) (void *user_data, const void *buf, size_t count,
+typedef int (*read_fn) (int valid_flag, void *user_data,
+ const void *buf, size_t count,
uint64_t offset, int status, int *error);
-typedef int (*callback_fn) (void *user_data, int64_t cookie, int *error);
+typedef int (*callback_fn) (int valid_flag, void *user_data,
+ int64_t cookie, int *error);
struct command_cb {
union {
diff --git a/tests/meta-base-allocation.c b/tests/meta-base-allocation.c
index 95e029b..b6a0e63 1...