For x64 I can use this: { uint64_t hi, lo; // hi,lo = 64bit x 64bit multiply of c[0] and b[0] __asm__("mulq %3\n\t" : "=d" (hi), "=a" (lo)
I am reading about the difference between CLOCK_REALTIME and CLOCK_MONOTONIC Difference between CLOCK_REALTIME and CLOCK_MONOTONIC? The CLOCK_REALTIME has dis
I've got a problem about creating a directory within a linux kernel module. What I want: Creating a directory within a kernel module. Here is my actual code:
I was building this code from this article I was using the recommended command to build it: gcc -Wall -o keyboard_leds keyboard_leds.c -framework IOKit -framewo
Till now I was believing that there is no use of unary + operator. But then I came across with following example: char ch; short sh; int i; printf("%d %d %d",s
I am writing a project that takes advantage of the hiredis redis client library. What is the best approach to mock this library for use in writing tests? For
I have added a file function.S in sys folder in XINU. .text .globl zfunction zfunction: <x86 code> equivalent C code for this function is long
Can sizeof(size_t) be less than sizeof(int)? Do the C and/or C++ standards guarantee that using unsigned int for array indexing is always safe?
I am trying to print some floating point numbers using printf. For example: int main() { printf("%.1f",76.75); return 0; } Output: 76.8 And I have som
I want to create a UDP socket connection to receive data from GStreamer udpsink. When I create a Gstreamer pipeline using udpsink, VLC can play the stream. I wa
How can affect on my app's status icon label in Gnome3? When i moving cursor on it shows me my app's executable name. How can I change it?
When I wish to check if a value is 0 in C, how is it idiomatically done? if (!num) if (num == 0)
I could not find a direct answer to this but is it possible to force a certain kind of data type for an enum in C ? e.g I have an enum for a state machine that
If I build a module which depends on other modules, and i get this warning: 'function or symbol ?' [source dir/my_module.ko] undefined! What does the warn
How do you check whether a path is absolute or relative, using C on Linux?
Forward declaration of enums in C does not work for me. I searched the internet and Stack Overflow but all of the questions regarding forward declarations of en
Why does the indexing in an array start with zero in C and not with 1?
Hello i am new to ubuntu. I want to run a c program in ubuntu.On the terminal i typed "make ex1.c" (my file name is ex1) and the after pressing enter button , t
I have just had a lecture that sums reaping as: Reaping Performed by parent on terminated child (using wait or waitpid) Parent is given exit status informato
This error stops my kernel make process ld: arch/x86/entry/syscall_64.o:(.rodata+0x1120): undefined reference to `__x64_sys_fd' BTF .btf.vmlinux.bin.o pahol