Skip to main content
-1 votes
0 answers
13 views

I’m currently unsure which programming language or computer science topic I should focus on. There are many options, and I don’t know where to begin. Any guidance or recommended learning paths would ...
Sein Sterben's user avatar
1 vote
1 answer
78 views

Furthermore, is the sizeof guaranteed to be the same on compatible types? I expect the answer to both of these questions is likely "yes" in practice, but I don't see anything in the standard ...
Grant Jurgensen's user avatar
2 votes
2 answers
118 views

I found this code on GitHub and realized the hard way that it works on Windows, but not on Linux #define HASH_CONSTANT 2654435769 uint32_t fibHash(uint32_t hash, uint32_t shift) { return (hash * ...
Costantino Grana's user avatar
0 votes
0 answers
94 views

I'm interested to understand more about performing file IO operations with systems programming languages in a way which does not use both a kernel space buffer and a user space buffer. Specifically I ...
user2138149's user avatar
  • 18.8k
7 votes
2 answers
107 views

I have a multi-threaded application. One of the threads is a background maintenance thread, which needs exclusive access to some of the files. The rest of the time, the file can be (and is) read by ...
Jay Bee's user avatar
  • 71
-3 votes
0 answers
89 views

I am writing a bare minimum HTTPS/TLS 1.3 server in C. Currently I want it to work an just the bare minimum spec: X22519 key establishment AES 128 GCM encryption Self signed certificate I find ...
whynotjava's user avatar
3 votes
2 answers
164 views

I've seem to run into something I can't really explain. I'm testing out passing a struct (typedef with an alias) by value into a function and printing out the addresses of each. I do realize that ...
Maryann's user avatar
  • 79
Advice
2 votes
7 replies
119 views

Let's consider this example code: #include <stdint.h> #include <stdio.h> struct image { int width, height; uint8_t *pixmap; }; static void iprint(const struct image *img) { ...
Costantino Grana's user avatar
12 votes
4 answers
1k views

Both amd64 and arm64 architecture processors have an overflow flag. However, in C, the most common method to detect whether an operation causes overflow/underflow is to make functions like these: int ...
Daniil Zuev's user avatar
Advice
0 votes
5 replies
128 views

I am reviewing an application and it has numerous functions with the following function declaration. I've never seen this type of function declaration with the "local" identifier before the ...
Skypilot65's user avatar
0 votes
1 answer
132 views

In C, I first opened a binary file like this--- FILE *BINfile = fopen("./tmp.bin", "rb+"); Then I transferred the data into an unsigned char array (typedef as byte) like this--- (...
Bedanta Hazarika's user avatar
3 votes
2 answers
111 views

I'm a computer science undergraduate student studying Linux kernel USB device drivers. While analyzing the skel_read() function in usb-skeleton.c, I noticed what seems like inconsistent retry logic. I'...
const's user avatar
  • 39
1 vote
1 answer
70 views

I am working on an embedded RTOS system for a 32-bit MIPS SOC, which supports DWC2 OTG. (It can run Linux well.) I ported an open-source USB stack to this system by following the porting guidance. ...
wangt13's user avatar
  • 1,317
3 votes
2 answers
179 views

First I opened a .txt file (less than 1kb btw) and stored the string data in a char array like this--- FILE *file = fopen("./tmp.txt","r+"); char CharArray[10000]; fread(CharArray,...
Bedanta Hazarika's user avatar
1 vote
1 answer
97 views

When I bind a BSTR to a column in an Access database (.mdb) and insert data into this column, I keep getting error #22001 which means the data has been truncated. The source of the data is shorter ...
Eugène Bindels's user avatar

15 30 50 per page