Skip to content
Advertisement

Tag: c++

How to Obtain Youngest Child’s PID from task_struct

I’m working on a project that involves writing a new system call for Linux 3.18.20. This system call is supposed to store various information about the currently running process in a newly defined struct. One of the fields of the struct is the PID of the process’s youngest child, and I’ve been searching for information about this in the struct

strange output from g_print

I get the following error when I compile my code: file.h: In function ‘add_new_set’: file.h:7:53: warning: format not a string literal and no format arguments [-Wformat-security] g_print (gtk_entry_get_text ((GtkEntry *)((struct data *) callback_params)->entry)); here’s my code: now when I press the button to run the g_print part, If I type in ‘%s test’ I get: (null) test now this seems

perf enable demangling of callgraph

How do I enable C++ demangling for the perf callgraph? It seems to demangle symbols when I go into annotate mode, but not in the main callgraph. Sample code (using Google Benchmark): build command: perf commands: I’ve also tried enabling the –demangle option, but that doesn’t seem to affect the output. callgraph missing demangled symbols: annotated disassembly showing demangled calls:

Covariance matrix with opencl and opencv

I recently start to learn opencl and how to create kernel for OpenCV as well. I am still working with the basics. I need to implement an opencl kernel for calculate the covariance matrix. This function don’t have any opencl kernel already implemented by opencv’s fundation. Technically what I want to process is that : I found OpenCV’s fundation have

Extracting type info from printf format string

I’d like to extract c++ type information from a printf format string. For example, I’ve attempted this using parse_printf_format() from printf.h, but the returned argtypes don’t appear to include information about signed/unsigned. Is there some way to get signed/unsigned info as well? Answer As I said in my answer, the parse_printf_format is not made for what you need. You can

PHP popen Application cannot open shared object

I’ve created a simple C++ Application with the boost framework. The Application is running correct from the command line. After this I’ve created a PHP file with a popen to this binary. After visiting the website I’ve got the following error message from apache2/error_log System is openSuse Linux. Steps done: Insert lib path to /etc/ld.so.conf and running ldconfig Answer You

How to control global OpenMP settings from C/C++?

OpenMP doesn’t provide API to adjust some crucial settings in runtime, e.g. OMP_WAIT_POLICY or GOMP_SPINCOUNT (at least in gcc 4.8.3). Such settings are designed to be changed through environment variables for some reason. Not very convenient. Is there any way I can change such settings in run-time from C/C++ using gcc on Linux? For example, would it be enough to

Advertisement