6 questions from the last 1 days
-4
votes
0
answers
50
views
Linux Sockets Correct Syntax Gcc Console App compiles with list of undefined errors unexplained? [closed]
#include <stdio.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <netdb.h>
#include &...
-5
votes
0
answers
81
views
Why does it keep promting me? [closed]
When I run this code:
#include <stdio.h>
#include <cs50.h>
int main(void)
{
int counter = 0; // Initialitzate counter
const int increment_every_time = get_int("What number do ...
2
votes
0
answers
59
views
Android (Linux) libc problems when creating an execuatable shared object
I have 2 files:
crt.c:
const char service_interp[] __attribute__((section(".interp"))) = "${LD_SO}";
extern void _exit (int __status) __attribute__ ((__noreturn__));
int main();
...
2
votes
0
answers
67
views
Packet corruption in Lockless ring buffer (multiple producer, single consumer)
I Am implementing Lockless ring buffer for multiple producer and single consumer (keeping in plan to extend it to multiple produce and consumer)
using design reference of dpdk buffer : https://doc....
1
vote
1
answer
51
views
The NEO-8M produces incomprehensible characters
I have that code:
#include <stdio.h>
#include <stdbool.h>
#include <unistd.h>
#include "esp_system.h"
#include "esp_timer.h"
#include "freertos/projdefs.h&...
-2
votes
0
answers
78
views
Which compiler optimizations can break code without volatile when calling through function pointers? [closed]
Here is the code:
void (*volatile sys_func)(void);
void
main(int argc, char **argv) {
int i, j;
for (j = 0; j < 3; ++j) {
for (i = 0; i < 10000; ++i);
sys_func();
}
...