search for: free_fn

Displaying 9 results from an estimated 9 matches for "free_fn".

2019 Mar 10
5
Help with bitcast instruction
...png_struct_def.68*, i8*)*)* @png_set_mem_fn to void (%struct.png_struct_def*, i8*, i8* (%struct.png_struct_def*, i64)*, void (%struct.png_struct_def*, i8*)*)*)(%struct.png_struct_def* %create_struct, i8* %mem_ptr, i8* (%struct.png_struct_def*, i64)* %malloc_fn, void (%struct.png_struct_def*, i8*)* %free_fn) #15 I would like to understand where bitcast is defined because it is not defined within libpng. I also noticed that the @ is not present, what does the missing @ mean? I guess it must be an LLVM function. The bitcast operation seems to represent the following C code: if (png_ptr != NULL) {...
2019 Mar 12
3
Help with bitcast instruction
...png_struct_def.68*, i8*)*)* @png_set_mem_fn to void (%struct.png_struct_def*, i8*, i8* (%struct.png_struct_def*, i64)*, void (%struct.png_struct_def*, i8*)*)*)(%struct.png_struct_def* %create_struct, i8* %mem_ptr, i8* (%struct.png_struct_def*, i64)* %malloc_fn, void (%struct.png_struct_def*, i8*)* %free_fn) #15 I'm pretty sure that this is a CallInst but when I try to call getCalledFunction() I receive a null pointer and that really surprise me. I would like to understand how to get the function that is called and its parameters. Can you tell me how please? Am i right saying that: (void (%str...
2019 Apr 27
2
Understand the meaning of preds = %0
...an: define noalias %struct.png_struct_def* @png_create_read_struct_2(i8* %user_png_ver, i8* %error_ptr, void (%struct.png_struct_def*, i8*)* %error_fn, void (%struct.png_struct_def*, i8*)* %warn_fn, i8* %mem_ptr, i8* (%struct.png_struct_def*, i64)* %malloc_fn, void (%struct.png_struct_def*, i8*)* %free_fn) #5 { %1 = tail call noalias %struct.png_struct_def* @png_create_png_struct(i8* %user_png_ver, i8* %error_ptr, void (%struct.png_struct_def*, i8*)* %error_fn, void (%struct.png_struct_def*, i8*)* %warn_fn, i8* %mem_ptr, i8* (%struct.png_struct_def*, i64)* %malloc_fn, void (%struct.png_struct_def*...
2019 Mar 16
2
Why getNumOperands() incorrectly returns 0?
...g_set_mem_fn. If I do F->dump() i can set the IR of that function correctly e.g.: ; Function Attrs: nounwind uwtable define void @png_set_mem_fn(%struct.png_struct_def.68* noalias %png_ptr, i8* %mem_ptr, i8* (%struct.png_struct_def.68*, i64)* %malloc_fn, void (%struct.png_struct_def.68*, i8*)* %free_fn) #5 { ... } The problem is that when I do F->getNumOperands() I have 0 as result. Can you explain me why please? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190316/4375e976/attachment.html&g...
2005 Mar 07
0
gcc4 warnings
...2 = (const unsigned char *)s2; unsigned char ch; int d = 0; --- syslinux-3.07/com32/lib/libpng/pngwrite.c.gcc4 2005-01-08 00:58:20.000000000 -0500 +++ syslinux-3.07/com32/lib/libpng/pngwrite.c 2005-03-07 11:26:46.000000000 -0500 @@ -435,7 +435,7 @@ png_malloc_ptr malloc_fn, png_free_ptr free_fn) { #endif /* PNG_USER_MEM_SUPPORTED */ - png_structp png_ptr; + volatile png_structp png_ptr; #ifdef PNG_SETJMP_SUPPORTED #ifdef USE_FAR_KEYWORD jmp_buf jmpbuf; --- syslinux-3.07/com32/lib/libpng/pngread.c.gcc4 2005-01-08 00:58:20.000000000 -0500 +++ syslinux-3.07/com32/lib/libpng/pngre...
2004 Feb 17
0
VFS module programmieren
...for handle private data. #define SMB_VFS_HANDLE_GET_DATA(handle, datap, type, ret) { \ if (!(handle)||((datap=(type *)(handle)->data)==NULL)) { \ DEBUG(0,("%s() failed to get vfs_handle->data!\n",FUNCTION_MACRO)); \ ret; \ } \ } #define SMB_VFS_HANDLE_SET_DATA(handle, datap, free_fn, type, ret) { \ if (!(handle)) { \ DEBUG(0,("%s() failed to set handle->data!\n",FUNCTION_MACRO)); \ ret; \ } else { \ if ((handle)->free_data) { \ (handle)->free_data(&(handle)->data); \ } \ (handle)->data = (void *)datap; \ (handle)->free_data = fr...
2019 Aug 12
2
Re: [PATCH libnbd 1/7] api: Add semi-private function for freeing persistent data.
...feedback from > perf. It's really about whether this is a better API for freeing or not. Getting rid of the VALID|FREE seems worthwhile, and _since_ that is already an API/ABI change, we can _also_ make the API/ABI change from Closure in C being a 2-tuple (fn, ptr) to being a 3-tuple (fn, free_fn, ptr). The tricky part that remains is how to convince the generator that the code for Python nbd.aio_pread AND for nbd.aio_pread_callback both need to use the C nbd_aio_pread_callback, for the sake of the completion's free_cb() to do the necessary refcount cleanup on the buf, at which point w...
2019 Aug 12
2
Re: [PATCH libnbd 1/7] api: Add semi-private function for freeing persistent data.
On 8/12/19 11:08 AM, Richard W.M. Jones wrote: > This adds a C-only semi-private function for freeing various types of > persistent data passed to libnbd. > > There are some similarities with nbd_add_close_callback which we > removed in commit 7f191b150b52ed50098976309a6af883d245fc56. > --- > +=head1 FREE CALLBACKS > + > +B<Note:> The API described in this
2019 Aug 13
12
[PATCH 0/6] Implement OClosure.
Patches 1-4 are basically uncontroversial, straightforward refactoring and IMHO we should just push them. Possibly 1-3 should be squashed together, but I posted them separately so they are easier to review. Patches 5 and 6 together implement OClosure. Patch 5 adds the feature and is simple to understand. Patch 6 changes the Closure completion callbacks into OClosure, but because it doesn't