Skip to content
Advertisement

Tag: struct

C++: How can statvfs take a structure of its own type as an input?

I am using statvfs to check the filesystem, and I have difficulties understanding how the following snippet works: I include the header. This is the only line that’s 100% clear to me here. I make aStructure of the type statvfs. I call statvfs with aPath and the structure from the previous step. In 2. statvfs was a structure, in 3.

BUG: unable to handle kernel paging request when accessing a custom struct in syscall

Using linux with kernel 4.4.21, I was required to implement a system call which has a custom struct’s pointer among its parameters. These are the files to to edit: I put sys_procmem.c (implementation) in linux-4.4.21/kernel/sys_procmem.c (sys_procmem.o added in that dir’s Makefile): Test: Both were killed miserably. dmesg: This was done inside a 64-bit Ubuntu 14.04 virtual machine. My friends had

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

Putting a Struct into Shared Memory

I have created two programs a server.c and a client.c. I have a struct that holds an age. I have got the programs working together to read the shared memory and to change the shared memory, however this only works when using one variable in the struct. As soon as i have more than one variable in the struct i

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

Advertisement