repo_full_name stringlengths 6 93 | repo_url stringlengths 25 112 | repo_api_url stringclasses 28
values | owner stringclasses 28
values | repo_name stringclasses 28
values | description stringclasses 28
values | stars int64 617 98.8k | forks int64 31 355 ⌀ | watchers int64 990 999 ⌀ | license stringclasses 2
values | default_branch stringclasses 2
values | repo_created_at timestamp[s]date 2012-07-24 23:12:50 2025-06-16 08:07:28 ⌀ | repo_updated_at timestamp[s]date 2026-02-23 15:23:15 2026-05-03 18:52:12 ⌀ | repo_topics listlengths 0 13 ⌀ | repo_languages unknown | is_fork bool 1
class | open_issues int64 3 104 ⌀ | file_path stringlengths 3 208 | file_name stringclasses 509
values | file_extension stringclasses 1
value | file_size_bytes int64 101 84k ⌀ | file_url stringclasses 627
values | file_raw_url stringclasses 627
values | file_sha stringclasses 624
values | language stringclasses 8
values | parsed_at stringdate 2026-05-04 01:12:36 2026-05-04 19:41:55 | text stringlengths 100 102k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Tongsuo-Project/Tongsuo | https://github.com/Tongsuo-Project/Tongsuo | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | apps/kdf.c | null | null | null | null | null | null | C | 2026-05-04T19:11:43.895169 | /*
* Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/l... |
Tongsuo-Project/Tongsuo | https://github.com/Tongsuo-Project/Tongsuo | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | apps/include/platform.h | null | null | null | null | null | null | C | 2026-05-04T19:11:43.928163 | /*
* Copyright 2019-2024 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/l... |
Tongsuo-Project/Tongsuo | https://github.com/Tongsuo-Project/Tongsuo | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | apps/lib/app_libctx.c | null | null | null | null | null | null | C | 2026-05-04T19:11:43.976860 | /*
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/l... |
Tongsuo-Project/Tongsuo | https://github.com/Tongsuo-Project/Tongsuo | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | apps/lib/app_params.c | null | null | null | null | null | null | C | 2026-05-04T19:11:44.320536 | /*
* Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/l... |
Tongsuo-Project/Tongsuo | https://github.com/Tongsuo-Project/Tongsuo | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | apps/lib/app_provider.c | null | null | null | null | null | null | C | 2026-05-04T19:11:44.367429 | /*
* Copyright 2020-2025 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/l... |
Tongsuo-Project/Tongsuo | https://github.com/Tongsuo-Project/Tongsuo | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | apps/lib/app_rand.c | null | null | null | null | null | null | C | 2026-05-04T19:11:44.405902 | /*
* Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/l... |
Tongsuo-Project/Tongsuo | https://github.com/Tongsuo-Project/Tongsuo | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | apps/lib/apps_ui.c | null | null | null | null | null | null | C | 2026-05-04T19:11:44.508650 | /*
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/l... |
Tongsuo-Project/Tongsuo | https://github.com/Tongsuo-Project/Tongsuo | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | apps/lib/columns.c | null | null | null | null | null | null | C | 2026-05-04T19:11:44.510831 | /*
* Copyright 2017-2019 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/l... |
Tongsuo-Project/Tongsuo | https://github.com/Tongsuo-Project/Tongsuo | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | apps/lib/apps_opt_printf.c | null | null | null | null | null | null | C | 2026-05-04T19:11:44.520097 | /*
* Copyright 2022 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/licens... |
Tongsuo-Project/Tongsuo | https://github.com/Tongsuo-Project/Tongsuo | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | apps/lib/cmp_mock_srv.c | null | null | null | null | null | null | C | 2026-05-04T19:11:44.520572 | /*
* Copyright 2018-2025 The OpenSSL Project Authors. All Rights Reserved.
* Copyright Siemens AG 2018-2020
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or atf
... |
Tongsuo-Project/Tongsuo | https://github.com/Tongsuo-Project/Tongsuo | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | apps/lib/apps.c | null | null | null | null | null | null | C | 2026-05-04T19:11:44.572264 | /*
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/l... |
Tongsuo-Project/Tongsuo | https://github.com/Tongsuo-Project/Tongsuo | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | apps/lib/engine_loader.c | null | null | null | null | null | null | C | 2026-05-04T19:11:44.585483 | /*
* Copyright 2018-2022 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/l... |
Tongsuo-Project/Tongsuo | https://github.com/Tongsuo-Project/Tongsuo | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | apps/lib/engine.c | null | null | null | null | null | null | C | 2026-05-04T19:11:44.610270 | /*
* Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/licens... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | examples/http3_server.c | null | null | null | null | null | null | C | 2026-05-04T19:11:46.925628 | #ifdef LIBUS_USE_QUIC
#define _GNU_SOURCE
#include <unistd.h>
#include <stdlib.h>
/* Experimental HTTP/3 server. You can use quiche-client --no-verify https://[::1]:9004/ */
#include <libusockets.h>
/* Quic interface is not exposed under libusockets.h yet */
#include "quic.h"
/* Let's just have this one here for no... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | examples/tcp_server.c | null | null | null | null | null | null | C | 2026-05-04T19:11:46.927059 | #include <libusockets.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* We don't need any of these */
void on_wakeup(struct us_loop_t *loop) {
}
void on_pre(struct us_loop_t *loop) {
}
/* This is not HTTP POST, it is merely an event emitted post loop iteration */
void on_post(struct us_loop_t *loop... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | examples/peer_verify_test.c | null | null | null | null | null | null | C | 2026-05-04T19:11:46.930443 | /* This example, or test, is a moron test where the library is being hammered in all the possible ways randomly over time */
#include <libusockets.h>
const int SSL = 1;
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <stdbool.h>
int port;
int opened_connections, closed_connectio... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | examples/http_load_test.c | null | null | null | null | null | null | C | 2026-05-04T19:11:46.933779 | /* This is a simple yet efficient HTTP server benchmark */
#include <libusockets.h>
/* If compiled with SSL support, enable it */
const int SSL = 1;
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char request_template[] = "GET / HTTP/1.1\r\nHost: localhost:3000\r\nUser-Agent: curl/7.68.0\r\nAccept: */*\r\... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | examples/echo_server.c | null | null | null | null | null | null | C | 2026-05-04T19:11:46.939317 | /* This is a basic TCP/TLS echo server. */
#include <libusockets.h>
const int SSL = 1;
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* Our socket extension */
struct echo_socket {
char *backpressure;
int length;
};
/* Our socket context extension */
struct echo_context {
};
/* Loop wakeup handler ... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | examples/hammer_test_unix.c | null | null | null | null | null | null | C | 2026-05-04T19:11:46.940490 | /* This example, or test, is a moron test where the library is being hammered in all the possible ways randomly over time */
#include <libusockets.h>
const int SSL = 1;
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#define PBSTR "||||||||||||||||||||||||||||||||||||||||||||||... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | examples/http3_client.c | null | null | null | null | null | null | C | 2026-05-04T19:11:46.942958 | #ifdef LIBUS_USE_QUIC
#define _GNU_SOURCE
#include <unistd.h>
#include <stdlib.h>
/* Experimental HTTP/3 client */
#include <libusockets.h>
/* Quic interface is not exposed under libusockets.h yet */
#include "quic.h"
/* Let's just have this one here for now */
us_quic_socket_context_t *context;
int responses = 0;
... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | examples/http_server.c | null | null | null | null | null | null | C | 2026-05-04T19:11:46.959628 | /* This is a barebone keep-alive HTTP server */
#include <libusockets.h>
/* Compiling with LIBUS_NO_SSL will ignore SSL */
const int SSL = 1;
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
struct http_socket {
/* How far we have streamed our response */
int offset;
};
struct http_context {
/* The shar... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | examples/hammer_test.c | null | null | null | null | null | null | C | 2026-05-04T19:11:46.962620 | /* This example, or test, is a moron test where the library is being hammered in all the possible ways randomly over time */
#include <libusockets.h>
const int SSL = 1;
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#define PBSTR "||||||||||||||||||||||||||||||||||||||||||||||||||||||||... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | examples/tcp_load_test.c | null | null | null | null | null | null | C | 2026-05-04T19:11:46.963160 | #include <libusockets.h>
const int SSL = 0;
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char request[] = "Hello there!";
char *host;
int port;
int connections;
int responses;
/* We don't need any of these */
void on_wakeup(struct us_loop_t *loop) {
}
void on_pre(struct us_loop_t *loop) {
}
/* Thi... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/bsd.c | null | null | null | null | null | null | C | 2026-05-04T19:11:47.685243 | /*
* Authored by Alex Hultman, 2018-2021.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Un... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | examples/udp_benchmark.c | null | null | null | null | null | null | C | 2026-05-04T19:11:47.687860 | /* Simple usage of two UDP sockets sending messages to eachother like ping/pong */
#include <libusockets.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifndef LIBUS_USE_IO_URING
/* This one we allow here since we use it to create the peer addr.
* We should remove this and replace it with bsd_addr_t ... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/eventing/libuv.c | null | null | null | null | null | null | C | 2026-05-04T19:11:47.721483 | /*
* Authored by Alex Hultman, 2018-2021.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Un... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/internal/eventing/gcd.h | null | null | null | null | null | null | C | 2026-05-04T19:11:47.865192 | /*
* Authored by Alex Hultman, 2018-2019.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Un... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/context.c | null | null | null | null | null | null | C | 2026-05-04T19:11:47.871025 | /*
* Authored by Alex Hultman, 2018-2019.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Un... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/internal/eventing/asio.h | null | null | null | null | null | null | C | 2026-05-04T19:11:47.872858 | /*
* Authored by Alex Hultman, 2018-2021.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Un... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/eventing/gcd.c | null | null | null | null | null | null | C | 2026-05-04T19:11:47.875013 | /*
* Authored by Alex Hultman, 2018-2021.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Un... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/internal/eventing/epoll_kqueue.h | null | null | null | null | null | null | C | 2026-05-04T19:11:47.907361 | /*
* Authored by Alex Hultman, 2018-2019.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Un... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/eventing/epoll_kqueue.c | null | null | null | null | null | null | C | 2026-05-04T19:11:47.908610 | /*
* Authored by Alex Hultman, 2018-2019.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Un... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/crypto/openssl.c | null | null | null | null | null | null | C | 2026-05-04T19:11:47.978223 | /*
* Authored by Alex Hultman, 2018-2019.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Un... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/internal/internal.h | null | null | null | null | null | null | C | 2026-05-04T19:11:48.589568 | /*
* Authored by Alex Hultman, 2018-2019.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Un... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/internal/eventing/libuv.h | null | null | null | null | null | null | C | 2026-05-04T19:11:48.590638 | /*
* Authored by Alex Hultman, 2018-2019.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Un... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/internal/loop_data.h | null | null | null | null | null | null | C | 2026-05-04T19:11:48.591786 | /*
* Authored by Alex Hultman, 2018-2019.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Un... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/io_uring/io_socket.c | null | null | null | null | null | null | C | 2026-05-04T19:11:48.766224 | /*
* Authored by Alex Hultman, 2018-2021.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Un... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/loop.c | null | null | null | null | null | null | C | 2026-05-04T19:11:48.767494 | /*
* Authored by Alex Hultman, 2018-2021.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Un... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/internal/networking/bsd.h | null | null | null | null | null | null | C | 2026-05-04T19:11:48.769164 | /*
* Authored by Alex Hultman, 2018-2019.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Un... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/io_uring/io_context.c | null | null | null | null | null | null | C | 2026-05-04T19:11:48.856618 | /*
* Authored by Alex Hultman, 2018-2019.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Un... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/io_uring/io_loop.c | null | null | null | null | null | null | C | 2026-05-04T19:11:48.873904 | /*
* Authored by Alex Hultman, 2018-2021.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Un... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/libusockets.h | null | null | null | null | null | null | C | 2026-05-04T19:11:48.899646 | /*
* Authored by Alex Hultman, 2018-2019.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Un... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/io_uring/internal.h | null | null | null | null | null | null | C | 2026-05-04T19:11:49.124690 | #include <errno.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <sys/poll.h>
#include <sys/socket.h>
#include <unistd.h>
#include "liburing.h"
#define MAX_CONNECTIONS 4096
#define BACKLOG 512
#define MAX_MESSAGE_LEN... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/quic.h | null | null | null | null | null | null | C | 2026-05-04T19:11:49.197515 | #ifdef LIBUS_USE_QUIC
#ifndef LIBUS_QUIC_H
#define LIBUS_QUIC_H
/* Experimental QUIC functions */
#include "libusockets.h"
typedef struct {
const char *cert_file_name;
const char *key_file_name;
const char *passphrase;
} us_quic_socket_context_options_t;
typedef struct {
/* Refers to either the sh... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/socket.c | null | null | null | null | null | null | C | 2026-05-04T19:11:49.245507 | /*
* Authored by Alex Hultman, 2018-2021.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Un... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/quic.c | null | null | null | null | null | null | C | 2026-05-04T19:11:49.249297 | #ifdef LIBUS_USE_QUIC
/* Todo: quic layer should not use bsd layer directly (sendmmsg) */
#include "internal/networking/bsd.h"
#include "quic.h"
#include "lsquic.h"
#include "lsquic_types.h"
#include "lsxpack_header.h"
/* Todo: remove these */
#ifndef _WIN32
#include <netinet/in.h>
#include <errno.h>
#endif
#inc... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/udp.c | null | null | null | null | null | null | C | 2026-05-04T19:11:49.611467 | /*
* Authored by Alex Hultman, 2018-2021.
* Intellectual property of third-party.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Un... |
uNetworking/uSockets | https://github.com/uNetworking/uSockets | null | null | null | null | 1,452 | null | null | apache-2.0 | null | null | null | null | null | null | null | tests/sni_test.c | null | null | null | null | null | null | C | 2026-05-04T19:11:49.612007 | extern "C" {
void *sni_new();
void sni_free(void *sni, void (*cb)(void *user));
int sni_add(void *sni, const char *hostname, void *user);
void *sni_remove(void *sni, const char *hostname);
void *sni_find(void *sni, const char *hostname);
}
#include <assert.h>
#include <stdio.h>
/* Todo: replace 13, 14 and 15 with mal... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core.tests/src/containers/binary_string_table_tests.c | null | null | null | null | null | null | C | 2026-05-04T19:11:54.247027 | #include "binary_string_table_tests.h"
#include "../expect.h"
#include "../test_manager.h"
#include "strings/kstring.h"
#include <containers/binary_string_table.h>
#include <defines.h>
#include <memory/kmemory.h>
static b8 create_and_verify(binary_string_table* out_table) {
*out_table = binary_string_table_create(... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core.tests/src/containers/hashtable_tests.c | null | null | null | null | null | null | C | 2026-05-04T19:11:54.250545 | #include "hashtable_tests.h"
#include "../expect.h"
#include "../test_manager.h"
#include <containers/hashtable.h>
#include <defines.h>
u8 hashtable_should_create_and_destroy(void) {
hashtable table;
u64 element_size = sizeof(u64);
u64 element_count = 3;
u64 memory[3];
hashtable_create(element_size, element_cou... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core.tests/src/containers/array_tests.c | null | null | null | null | null | null | C | 2026-05-04T19:11:54.257753 |
#include "../expect.h"
#include "../test_manager.h"
#include <containers/array.h>
#include <defines.h>
#include <memory/kmemory.h>
static u8 all_array_tests_after_create(void) {
// Test a basic type first.
array_u8 arr = array_u8_create(6);
// Verify that the memory was assigned.
expect_should_not_be(arr.data, ... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core.tests/src/containers/darray_tests.c | null | null | null | null | null | null | C | 2026-05-04T19:11:54.267781 |
#include "../expect.h"
#include "../test_manager.h"
#include <containers/darray.h>
#include <defines.h>
#include <memory/allocators/linear_allocator.h>
#include <memory/kmemory.h>
static linear_allocator alloc;
static frame_allocator_int frame_allocator;
static void* fn_alloc(u64 size) {
return linear_allocator_al... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core.tests/src/containers/freelist_tests.c | null | null | null | null | null | null | C | 2026-05-04T19:11:54.268884 | #include "../expect.h"
#include "../test_manager.h"
#include <containers/freelist.h>
#include <defines.h>
#include <memory/kmemory.h>
u8 freelist_should_create_and_destroy(void) {
// NOTE: creating a small size list, which will trigger a warning.
KDEBUG("The following warning message is intentional.");
freelist l... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core.tests/src/main.c | null | null | null | null | null | null | C | 2026-05-04T19:11:56.269959 | #include <logger.h>
#include "containers/array_tests.h"
#include "containers/binary_string_table_tests.h"
#include "containers/darray_tests.h"
#include "containers/freelist_tests.h"
#include "containers/hashtable_tests.h"
#include "containers/stackarray_tests.h"
#include "memory/dynamic_allocator_tests.h"
#include "me... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core.tests/src/parsers/kson_parser_tests.c | null | null | null | null | null | null | C | 2026-05-04T19:11:56.271577 | #include "kson_parser_tests.h"
#include <containers/darray.h>
#include <defines.h>
#include <parsers/kson_parser.h>
#include <platform/filesystem.h>
#include <strings/kstring.h>
#include "../expect.h"
#include "../test_manager.h"
#include "logger.h"
u8 kson_parser_should_create_and_destroy(void) {
kson_parser parse... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core.tests/src/memory/linear_allocator_tests.c | null | null | null | null | null | null | C | 2026-05-04T19:11:56.272893 | #include "linear_allocator_tests.h"
#include <defines.h>
#include <memory/allocators/linear_allocator.h>
#include "../expect.h"
#include "../test_manager.h"
u8 linear_allocator_should_create_and_destroy(void) {
linear_allocator alloc;
linear_allocator_create(sizeof(u64), 0, &alloc);
expect_should_not_be(0, alloc... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core.tests/src/memory/dynamic_allocator_tests.c | null | null | null | null | null | null | C | 2026-05-04T19:11:56.293034 | #include "dynamic_allocator_tests.h"
#include "../expect.h"
#include "../test_manager.h"
#include <defines.h>
#include <memory/allocators/dynamic_allocator.h>
#include <memory/kmemory.h>
u8 dynamic_allocator_should_create_and_destroy(void) {
dynamic_allocator alloc;
u64 memory_requirement = 0;
// Get the memory r... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core.tests/src/containers/stackarray_tests.c | null | null | null | null | null | null | C | 2026-05-04T19:11:56.322103 |
#include "../expect.h"
#include "../test_manager.h"
#include <containers/stackarray.h>
#include <defines.h>
#include <memory/kmemory.h>
STACKARRAY_TYPE(u8, 6);
STACKARRAY_TYPE(f32, 6);
STACKARRAY_TYPE_NAMED(const char*, string, 6);
static u8 all_stackarray_tests_after_create(void) {
// Test a basic type first.
s... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core.tests/src/expect.h | null | null | null | null | null | null | C | 2026-05-04T19:11:56.323398 | #include <logger.h>
#include <math/kmath.h>
#include <strings/kstring.h>
/**
* @brief Expects expected to be equal to actual.
*/
#define expect_should_be(expected, actual) \
if (actual != expected) { ... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/binary_string_table.c | null | null | null | null | null | null | C | 2026-05-04T19:11:57.422822 | #include "binary_string_table.h"
#include "darray.h"
#include "debug/kassert.h"
#include "defines.h"
#include "memory/kmemory.h"
#include "strings/kstring.h"
binary_string_table binary_string_table_create(void) {
binary_string_table table = {
.lookup = darray_create(binary_string_table_entry),
.header.entry_count... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/array.h | null | null | null | null | null | null | C | 2026-05-04T19:11:57.435263 | /**
* @file array.h
* @author Travis Vroman (travis@kohiengine.com)
* @brief This files contains an implementation of a static-sized (but dynamically allocated) array.
*
* @details
* Create an array type for a simple type using:
* `ARRAY_TYPE(f64)`.
* Create an array type for "advanced" types, such as strings... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core.tests/src/strings/string_tests.c | null | null | null | null | null | null | C | 2026-05-04T19:11:57.453057 |
#include "../expect.h"
#include "../test_manager.h"
#include <defines.h>
#include <memory/kmemory.h>
#include <strings/kstring.h>
static u8 kstr_ncmp_tests(void) {
const char* str_a = "texture";
const char* str_b = "text";
// set max length of shorter string
{
// Same strings.
i64 result = kstr_ncmp(str_a,... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/assets/kasset_utils.c | null | null | null | null | null | null | C | 2026-05-04T19:11:57.454351 | #include "kasset_utils.h"
#include "assets/kasset_types.h"
#include "debug/kassert.h"
#include "logger.h"
#include "strings/kstring.h"
// Static lookup table for kasset type strings.
static const char* kasset_type_strs[KASSET_TYPE_MAX] = {
"Unknown", // KASSET_TYPE_UNKNOWN,
"Image", // KASSET_TYPE_IMAGE,
"Mate... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core.tests/src/test_manager.c | null | null | null | null | null | null | C | 2026-05-04T19:11:57.484420 | #include "test_manager.h"
#include <containers/darray.h>
#include <logger.h>
#include <strings/kstring.h>
#include <time/kclock.h>
typedef struct test_entry {
PFN_test func;
char* desc;
} test_entry;
static test_entry* tests;
void test_manager_init(void) {
tests = darray_create(test_entry);
}
void test_manager_... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/array.c | null | null | null | null | null | null | C | 2026-05-04T19:11:57.485389 | #include "array.h"
#include "debug/kassert.h"
#include "memory/kmemory.h"
void _karray_init(u32 length, u32 stride, u32* out_length, u32* out_stride, void** block) {
KASSERT_DEBUG(length);
KASSERT_DEBUG(stride);
KASSERT_DEBUG(out_length);
KASSERT_DEBUG(out_stride);
KASSERT_DEBUG(block);
*out_length = length;
*... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core.tests/src/test_manager.h | null | null | null | null | null | null | C | 2026-05-04T19:11:57.501098 | #pragma once
#include <defines.h>
#define BYPASS 2
typedef u8 (*PFN_test)(void);
void test_manager_init(void);
void test_manager_register_test(PFN_test, char* desc);
void test_manager_run_tests(void); |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/assets/kasset_types.h | null | null | null | null | null | null | C | 2026-05-04T19:11:57.634244 | #pragma once
#include "core_render_types.h"
#include "defines.h"
#include "identifiers/identifier.h"
#include "math/math_types.h"
#include "parsers/kson_parser.h"
#include "strings/kname.h"
/** @brief A magic number indicating the file as a kohi binary asset file. */
#define ASSET_MAGIC 0xDECAFBAD
// The maximum len... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/assets/kasset_utils.h | null | null | null | null | null | null | C | 2026-05-04T19:11:57.660797 | #pragma once
#include "assets/kasset_types.h"
#include "defines.h"
struct kasset_name;
/**
* @brief Attempts to convert the provided type string to the appropriate enumeration value.
*
* @param type_str The type string to be examined.
* @return The converted type if successful; otherwise KASSET_TYPE_UNKNOWN.
*/... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/bvh.c | null | null | null | null | null | null | C | 2026-05-04T19:11:58.171056 | #include "bvh.h"
#include "containers/darray.h"
#include "debug/kassert.h"
#include "defines.h"
#include "logger.h"
#include "math/kmath.h"
#include "math/math_types.h"
#include "memory/kmemory.h"
#include "strings/kstring.h"
// The amount of padding around a tight AABB.
#define BVH_PADDING 0.1f
// Uncomment the belo... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/bvh.h | null | null | null | null | null | null | C | 2026-05-04T19:11:58.182418 | #pragma once
#include "defines.h"
#include "math/math_types.h"
typedef u32 bvh_id;
typedef u64 bvh_userdata;
#define BVH_INVALID_NODE INVALID_ID_U32
typedef struct bvh_node {
aabb aabb; // padded AABB for leaves, tight AABB for internal.
bvh_userdata user; // user payload for leaves
u32 parent; // index
... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/binary_string_table.h | null | null | null | null | null | null | C | 2026-05-04T19:11:58.202918 | /**
* @file binary_string_table.h
* @author Travis Vroman (travis@kohiengine.com)
* @brief This files contains an implementation of a binary string table.
*
* @details A binary string table is used to hold strings in a contiguous block of memory
* in a way that is easily serialized and referenced. Strings are ref... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/darray.h | null | null | null | null | null | null | C | 2026-05-04T19:11:58.218844 | /**
* @file darray.h
* @author Travis Vroman (travis@kohiengine.com)
* @brief This files contains an implementation of a dynamic array.
*
* @details
* Memory layout:
* - u64 capacity = number elements that can be held. (8 bytes)
* - u64 length = number of elements currently contained (8 bytes)
* - u64 stride =... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/freelist.h | null | null | null | null | null | null | C | 2026-05-04T19:11:58.247343 | /**
* @file freelist.h
* @author your name (you@domain.com)
* @brief This file contains a free list, used for custom memory allocation tracking.
* @version 0.1
* @date 2022-01-12
*
* @copyright Copyright (c) 2022
*
*/
#pragma once
#include "defines.h"
/**
* @brief A data structure to be used alongside an a... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/darray.c | null | null | null | null | null | null | C | 2026-05-04T19:11:58.248638 | #include "containers/darray.h"
#include "debug/kassert.h"
#include "defines.h"
#include "logger.h"
#include "memory/kmemory.h"
void* _darray_create(u64 length, u64 stride, frame_allocator_int* allocator) {
u64 header_size = sizeof(darray_header);
u64 array_size = length * stride;
void* new_array = 0;
if (allocato... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/hashtable.c | null | null | null | null | null | null | C | 2026-05-04T19:11:58.255711 | #include "hashtable.h"
#include "logger.h"
#include "memory/kmemory.h"
static u64 hash_name(const char* name, u32 element_count) {
// A multipler to use when generating a hash. Prime to hopefully avoid collisions.
static const u64 multiplier = 97;
unsigned const char* us;
u64 hash = 0;
for (us = (unsigned cons... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/freelist.c | null | null | null | null | null | null | C | 2026-05-04T19:11:58.256266 | #include "freelist.h"
#include "logger.h"
#include "memory/kmemory.h"
typedef struct freelist_node {
u64 offset;
u64 size;
struct freelist_node* next;
} freelist_node;
typedef struct internal_state {
u64 total_size;
u64 max_entries;
freelist_node* head;
freelist_node* nodes;
} internal_state;
static freelist... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/queue.c | null | null | null | null | null | null | C | 2026-05-04T19:11:58.357714 | #include "queue.h"
#include "logger.h"
#include "memory/kmemory.h"
static void queue_ensure_allocated(queue* s, u32 count) {
if (s->allocated < s->element_size * count) {
void* temp = kallocate(count * s->element_size, MEMORY_TAG_ARRAY);
if (s->memory) {
kcopy_memory(temp, s->memory, s->allocated);
kfree(s... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/hashtable.h | null | null | null | null | null | null | C | 2026-05-04T19:11:58.359768 | /**
* @file hashtable.h
* @author Travis Vroman (travis@kohiengine.com)
* @brief This file contains the hashtable implementation.
* @version 1.0
* @date 2022-01-10
*
* @copyright Kohi Game Engine is Copyright (c) Travis Vroman 2021-2022
*
*/
#pragma once
#include "defines.h"
/**
* @brief Represents a simpl... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/registry.c | null | null | null | null | null | null | C | 2026-05-04T19:11:58.770230 | #include "registry.h"
#include "containers/darray.h"
#include "containers/registry.h"
#include "debug/kassert.h"
#include "defines.h"
#include "identifiers/khandle.h"
#include "logger.h"
#include "memory/kmemory.h"
void kregistry_create(kregistry* out_registry) {
if (!out_registry) {
KERROR("kregistry_create requi... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/queue.h | null | null | null | null | null | null | C | 2026-05-04T19:11:58.800688 |
/**
* @file queue.h
* @author Travis Vroman (travis@kohiengine.com)
* @brief A simple queue container. Elements are popped off the queue in the
* same order they were pushed to it.
* @version 1.0
* @date 2024-02-04
*
* @copyright Kohi Game Engine is Copyright (c) Travis Vroman 2021-2024
*
*/
#pragma once
#i... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/registry.h | null | null | null | null | null | null | C | 2026-05-04T19:11:58.801562 | /**
* @file registry.h
* @author Travis Vroman (travis@kohiengine.com)
* @brief A registry holds arbitrarily-sized blocks of memory that are referenced by handle.
* These blocks are stored along with their size in the registry, and the registry owns
* its own copy of the data (if a block is probided, it takes a co... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/ring_queue.c | null | null | null | null | null | null | C | 2026-05-04T19:11:58.829914 | #include "ring_queue.h"
#include "logger.h"
#include "memory/kmemory.h"
b8 ring_queue_create(u32 stride, u32 capacity, void* memory, ring_queue* out_queue) {
if (!out_queue) {
KERROR("ring_queue_create requires a valid pointer to hold the queue.");
return false;
}
out_queue->length = 0;
out_queue->capacity =... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/stack.c | null | null | null | null | null | null | C | 2026-05-04T19:11:58.858895 | #include "stack.h"
#include "logger.h"
#include "memory/kmemory.h"
static void stack_ensure_allocated(stack* s, u32 count) {
if (s->allocated < s->element_size * count) {
void* temp = kallocate(count * s->element_size, MEMORY_TAG_ARRAY);
if (s->memory) {
kcopy_memory(temp, s->memory, s->allocated);
kfree(s... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/ring_queue.h | null | null | null | null | null | null | C | 2026-05-04T19:11:58.883888 | #pragma once
#include "defines.h"
/**
* @brief Represents a ring queue of a particular size. Does not resize dynamically.
* Naturally, this is a first in, first out structure.
*/
typedef struct ring_queue {
/** @brief The current number of elements contained. */
u32 length;
/** @brief The size of each element i... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/stack.h | null | null | null | null | null | null | C | 2026-05-04T19:11:58.884377 | /**
* @file stack.h
* @author Travis Vroman (travis@kohiengine.com)
* @brief A simple stack container. Elements may be pushed on or popped
* off of the stack only.
* @version 1.0
* @date 2023-01-18
*
* @copyright Kohi Game Engine is Copyright (c) Travis Vroman 2021-2023
*
*/
#pragma once
#include "defines.h"... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/stackarray.c | null | null | null | null | null | null | C | 2026-05-04T19:11:58.913009 | #include "stackarray.h"
stackarray_iterator stackarray_iterator_begin(stackarray_base* arr) {
stackarray_iterator it;
it.arr = arr;
it.pos = 0;
it.dir = 1;
it.end = stackarray_iterator_end;
it.value = stackarray_iterator_value;
it.next = stackarray_iterator_next;
it.prev = stackarray_iterator_prev;
return it;... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/u64_bst.c | null | null | null | null | null | null | C | 2026-05-04T19:11:58.943800 | #include "u64_bst.h"
#include "defines.h"
#include "memory/kmemory.h"
#include "strings/kstring.h"
static bt_node* node_create(u64 key, bt_node_value value) {
bt_node* node = kallocate(sizeof(bt_node), MEMORY_TAG_BST);
node->key = key;
node->value = value;
node->left = node->right = 0;
return node;
}
static bt_n... |
travisvroman/kohi | https://github.com/travisvroman/kohi | null | null | null | null | 1,438 | null | null | apache-2.0 | null | null | null | null | null | null | null | kohi.core/src/containers/stackarray.h | null | null | null | null | null | null | C | 2026-05-04T19:11:58.971739 |
/**
* @file stackarray.h
* @author Travis Vroman (travis@kohiengine.com)
* @brief This files contains an implementation of a static-sized stack-allocated array.
*
* @details
* Create an array type for a simple type using:
* `STACKARRAY_TYPE(f64, 4)`. This would create f64_stackarray_4.
* Create an array type... |
SeeFlowerX/stackplz | https://github.com/SeeFlowerX/stackplz | null | null | null | null | 1,401 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/common/buffer.h | null | null | null | null | null | null | C | 2026-05-04T19:12:01.807905 | #include "bpf/bpf_helpers.h"
#include "maps.h"
#include "types.h"
#define barrier() asm volatile("" ::: "memory")
static __always_inline buf_t *get_buf(int idx)
{
return bpf_map_lookup_elem(&bufs, &idx);
}
// The biggest element that can be saved with this function should be defined here
#define MAX_ELEMENT_SI... |
SeeFlowerX/stackplz | https://github.com/SeeFlowerX/stackplz | null | null | null | null | 1,401 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/common/consts.h | null | null | null | null | null | null | C | 2026-05-04T19:12:01.809260 | #ifndef __STACKPLZ_CONSTS_H__
#define __STACKPLZ_CONSTS_H__
#define TASK_COMM_LEN 16
#define MAX_COUNT 20
#define MAX_FILTER_COUNT 6
#define MAX_PATH_COMPONENTS 48
#define MAX_LOOP_COUNT 32
#define MAX_STRCMP_LEN 256
#define STRARR_MAGIC_LEN 0xffff0000
#if defined(__MODULE_STACK)
#define MAX_OP_COUNT 64
#elif d... |
SeeFlowerX/stackplz | https://github.com/SeeFlowerX/stackplz | null | null | null | null | 1,401 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/bpf/bpf_tracing.h | null | null | null | null | null | null | C | 2026-05-04T19:12:01.811038 | /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
#ifndef __BPF_TRACING_H__
#define __BPF_TRACING_H__
/* Scan the ARCH passed in from ARCH env variable (see Makefile) */
#if defined(__TARGET_ARCH_x86)
#define bpf_target_x86
#define bpf_target_defined
#elif defined(__TARGET_ARCH_s390)
#define bpf_target_s390... |
SeeFlowerX/stackplz | https://github.com/SeeFlowerX/stackplz | null | null | null | null | 1,401 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/common/common.h | null | null | null | null | null | null | C | 2026-05-04T19:12:01.820898 | #ifndef __STACKPLZ_COMMON_H__
#define __STACKPLZ_COMMON_H__
#include "bpf_helpers.h"
#include "maps.h"
#include <vmlinux_510.h>
// helper macros for branch prediction
#ifndef likely
#define likely(x) __builtin_expect((x), 1)
#endif
#ifndef unlikely
#define unlikely(x) __builtin_expect((x), 0)
#endif
#defin... |
SeeFlowerX/stackplz | https://github.com/SeeFlowerX/stackplz | null | null | null | null | 1,401 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/common/context.h | null | null | null | null | null | null | C | 2026-05-04T19:12:01.829426 | #ifndef __EVENT_INIT_H__
#define __EVENT_INIT_H__
#include "vmlinux_510.h"
#include "bpf_helpers.h"
#include "common/common.h"
#include <common/task.h>
#include "common/consts.h"
#include "types.h"
#include "maps.h"
static __always_inline int
init_context(void *ctx, event_context_t *context, struct task_struct *task... |
SeeFlowerX/stackplz | https://github.com/SeeFlowerX/stackplz | null | null | null | null | 1,401 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/common/arch.h | null | null | null | null | null | null | C | 2026-05-04T19:12:01.830698 | #ifndef __STACKPLZ_ARCH_H__
#define __STACKPLZ_ARCH_H__
#include "bpf_helpers.h"
#include "bpf_tracing.h"
#include "common/common.h"
#if defined(__TARGET_ARCH_x86)
#define PT_REGS_PARM6(ctx) ((ctx)->r9)
#elif defined(__TARGET_ARCH_arm64)
#define PT_REGS_PARM6(x) ((x)->regs[5])
#endif
#endif |
SeeFlowerX/stackplz | https://github.com/SeeFlowerX/stackplz | null | null | null | null | 1,401 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/common/task.h | null | null | null | null | null | null | C | 2026-05-04T19:12:01.831688 | #ifndef __STACKPLZ_TASK_H__
#define __STACKPLZ_TASK_H__
#include "vmlinux_510.h"
#include "bpf_core_read.h"
#include "bpf_helpers.h"
#include "common/common.h"
static __always_inline u32 get_task_pid_vnr(struct task_struct *task)
{
unsigned int level = 0;
struct pid *pid = NULL;
pid = READ_KERN(task->thr... |
SeeFlowerX/stackplz | https://github.com/SeeFlowerX/stackplz | null | null | null | null | 1,401 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/common/filtering.h | null | null | null | null | null | null | C | 2026-05-04T19:12:01.850273 | #ifndef __FILTERING_H__
#define __FILTERING_H__
#include "vmlinux_510.h"
#include "maps.h"
#include "types.h"
static __always_inline u64 should_trace(program_data_t *p)
{
config_entry_t *config = p->config;
event_context_t *context = &p->event->context;
u32 host_uid = bpf_get_current_uid_gid() & 0xfffff... |
SeeFlowerX/stackplz | https://github.com/SeeFlowerX/stackplz | null | null | null | null | 1,401 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/common/arguments.h | null | null | null | null | null | null | C | 2026-05-04T19:12:01.851294 | #ifndef __STACKPLZ_EVENTS_ARGS_H__
#define __STACKPLZ_EVENTS_ARGS_H__
#include "bpf/bpf_helpers.h"
#include "common/arch.h"
#include "maps.h"
static __always_inline int save_regs(ctx_regs_t *ctx_regs, u32 event_id)
{
u64 id = event_id;
u32 tid = bpf_get_current_pid_tgid();
id = id << 32 | tid;
bpf_map... |
SeeFlowerX/stackplz | https://github.com/SeeFlowerX/stackplz | null | null | null | null | 1,401 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/memory.h | null | null | null | null | null | null | C | 2026-05-04T19:12:02.423252 | #ifndef __STACKPLZ_MEMORY_H__
#define __STACKPLZ_MEMORY_H__
// #include "vmlinux_510.h"
// #include "bpf_helpers.h"
#include "common/common.h"
static __always_inline struct mm_struct *get_mm_from_task(struct task_struct *task)
{
return READ_KERN(task->mm);
}
static __always_inline unsigned long get_arg_start_fro... |
SeeFlowerX/stackplz | https://github.com/SeeFlowerX/stackplz | null | null | null | null | 1,401 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/maps.h | null | null | null | null | null | null | C | 2026-05-04T19:12:02.429635 | #ifndef __MAPS_H__
#define __MAPS_H__
#include "vmlinux_510.h"
#include "bpf/bpf_helpers.h"
#include "types.h"
#define BPF_MAP(_name, _type, _key_type, _value_type, _max_entries) \
struct { \
... |
SeeFlowerX/stackplz | https://github.com/SeeFlowerX/stackplz | null | null | null | null | 1,401 | null | null | apache-2.0 | null | null | null | null | null | null | null | src/perf_mmap.c | null | null | null | null | null | null | C | 2026-05-04T19:12:02.456557 | #include "utils.h"
#include "vmlinux_510.h"
#include "bpf_helpers.h"
#include "bpf_tracing.h"
#include "bpf_core_read.h"
// #include "common/common.h"
struct {
__uint(type, BPF_MAP_TYPE_PERF_EVENT_ARRAY);
} fake_events SEC(".maps");
struct {
__uint(type, BPF_MAP_TYPE_PERF_EVENT_ARRAY);
} brk_events SEC(".m... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.