Moving the kernel to modern C
Moving the kernel to modern C
Posted Feb 25, 2022 15:13 UTC (Fri) by wtarreau (subscriber, #51152)In reply to: Moving the kernel to modern C by Wol
Parent article: Moving the kernel to modern C
#include <stdio.h>
#include <unistd.h>
int blah(long x, int j)
{
long i = x ? x : -1;
int k = i;
for (int i = 1; i < j; i++) {
k += i * 2;
char i = (k & 1) ? 'O' : 'E';
int pid = getpid();
printf("i=%d j=%d pid=%d\n", i, j, pid);
}
return k;
}
PS: sorry for the formatting, I didn't find how to make a code block.
The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:
Note: you can avoid this step in the future by logging into your LWN account.
