This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This program demonstrates a simple Object-Oriented Programming (OOP) | |
* approach in C using function pointers and structures. It renders pixel | |
* effects onto an RGBA32 buffer using SDL2 for window management and display. | |
* | |
* Supported effects: | |
* - Bitwise operations pattern | |
* - Mandelbrot fractal visualization | |
* | |
* Key controls: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Conway's Game of Life using SDL2 in C99 | |
* | |
* The grid size is dynamically scaled, and the cells are displayed in two | |
* states: dead and alive. The application uses a double-buffered grid to | |
* update the cell states based on the classic rules of Conway's Game of Life: | |
* - Any live cell with fewer than two live neighbors dies (underpopulation). | |
* - Any live cell with two or three live neighbors lives on to the next | |
* generation. | |
* - Any live cell with more than three live neighbors dies (overpopulation). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if !defined(__x86_64__) | |
#error "This program only works for x86_64" | |
#endif | |
#define _GNU_SOURCE | |
#include <errno.h> | |
#include <limits.h> | |
#include <linux/futex.h> | |
#include <sched.h> | |
#include <signal.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: all clean | |
TARGET = test-hashmap | |
all: $(TARGET) | |
include common.mk | |
CFLAGS = -I. | |
CFLAGS += -O2 -g | |
CFLAGS += -std=gnu11 -Wall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
obj-m += proc_queue.o | |
obj-m += proc_sched.o | |
obj-m += proc_set.o | |
PWD := $(shell pwd) | |
KERNELDIR ?= /lib/modules/`uname -r`/build | |
PWD := $(shell pwd) | |
all: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/fs/Kconfig b/fs/Kconfig | |
index c229f82..515f76d 100644 | |
--- a/fs/Kconfig | |
+++ b/fs/Kconfig | |
@@ -4,6 +4,12 @@ | |
menu "File systems" | |
+config DCACHE_NO_RCU | |
+ def_bool y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC = gcc | |
CFLAGS = -O2 -g -Wall -I. | |
CFLAGS += -fsanitize=thread | |
LDFLAGS = -fsanitize=thread | |
all: lfring | |
# Control the build verbosity | |
ifeq ("$(VERBOSE)","1") | |
Q := |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MODULENAME := vpoll | |
obj-m += $(MODULENAME).o | |
$(MODULENAME)-y += module.o | |
KERNELDIR ?= /lib/modules/`uname -r`/build | |
PWD := $(shell pwd) | |
all: | |
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules | |
gcc -Wall -o user user.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <linux/module.h> | |
#include <linux/skbuff.h> | |
#include <net/cfg80211.h> | |
#include <linux/mutex.h> | |
#include <linux/workqueue.h> | |
#define WIPHY_NAME "owl" /* Our WireLess */ | |
#define NDEV_NAME WIPHY_NAME "%d" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* simrupt: A device that simulates interrupts */ | |
#include <linux/cdev.h> | |
#include <linux/circ_buf.h> | |
#include <linux/init.h> | |
#include <linux/interrupt.h> | |
#include <linux/kfifo.h> | |
#include <linux/module.h> | |
#include <linux/slab.h> | |
#include <linux/workqueue.h> |
NewerOlder