Currently I’m writing a RPC system for delay tolerant networks based on the Serval project from Australia (GitHub) in C. Mainly I’m developing on macOS El Capitan and everything works fine. But it is somewhat important that my code runs on macOS and Linux. But Linux makes trouble. I choose automake as my build system since this is the only
Tag: c++
X11: XQueryPointer gives me fuzzy Windows
I am currently trying to find if one of my Windows is underneath the Mouse cursor. This is not done in my process that creates the window, but in another process. What I am currently doing is finding the Window via the process PID (and I made sure _NET_WM_PID is set correctly by my program). This basically works via XQueryTree
Differing CPUID usage from high-level languages
I’m attempting to utilize an x86 ASM function that requires certain processor architecture. I understand that I need to check a specific bit after calling “CPUID standard function 01H”. Below is a C implementation from the CPUID Wikipedia page for calling CPUID: Though the Linux kernel uses the function below: Which one is better? Other they essentually equivalent? Answer As
Why does msgrcv returns ENOMSG
System V message queue is created successfully, command ipcs -q outputs: But the program to receive the message returns: exit: msgrcv error, No message of desired type This is my code: Answer Transferring comments to an answer. I suggested: Maybe there isn’t a message waiting? Where did you write the code to send the message to the queue? The response
Use of -g and -o options in gcc command in c programming
Suppose there are 2 c program named abc.c and xyz.c . Now we want to work with the 2 executables at a time. So we change the name of the ./a.out using Even gcc -o abc abc.c works. What does the -g and -o in the above commands specify or describe? What is the significance of -g and -o in
C Server/Client with Sockets
[Just 2 minor questions on the ground of this remaining] I try to write a simple server/client in C to send messages over sockets. It must run under Linux and Windows with MinGW. I found many examples for Linux but way to many arent working with Windows. It would be really nice if you would help me. For the server
Compiling pintool with sqlite3 database
I am writing a pintool to instrument my binary. I would like to use sqlite3 database to store the information about instructions. I can compile and execute sqlite3 “helloworld” example without any problem. As well I can compile and execute my pintool without sqlite connection. However, whenever I integrate sqlite code in the pintool I have an error: dlopen failed:
How do I debug Android native code into kernel?
I compiled goldfish kernel with: I started the AVD with the compiled kernel. emulator -kernel goldfish/arch/arm/boot/zImage -avd TestAVD I pushed a compiled c program onto AVD. And I downloaded the libs (I’m not sure if it’s the proper way) run gdbserver: forward port: run gdb specify the search directory: connect to device I breaked at, for example, close. I couln’d
Closing then opening standard input in C under Linux
I have a C console application under Linux (Raspbian – Raspberry Pi). The program has some character animation – it prints out messages character by character. For example, the text Please give me your name! is printed out completely after 5 seconds (char by char). Afterwards, the user is asked to type in their name, which works just fine if
timer_create() not able to catch a signal in handler function
Here i am trying achieve a timer say 0-10secs and an interval of 2secs each,so that i need to generate an interrupt @ every 2secs(total 5 times) saying 2secs completed. which i have been cross checking in handler() function by using printf(). But i am not able to achieve the desired result.please put me touch if anyone is aware of