instruction
stringlengths
82
202
input
stringclasses
1 value
output
stringlengths
73
23.9M
Linux işletim sistemi çekirdeği için 'tools/verification/rv/include/trace' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c // SPDX-License-Identifier: GPL-2.0 #include <tracefs.h> struct trace_instance { struct tracefs_instance *inst; struct tep_handle *tep; struct trace_seq *seq; }; int trace_instance_init(struct trace_instance *trace, char *name); int trace_instance_start(struct trace_instance *trace); void trace_instance_d...
Linux işletim sistemi çekirdeği için 'tools/verification/rv/include/utils' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c // SPDX-License-Identifier: GPL-2.0 #define MAX_PATH 1024 void debug_msg(const char *fmt, ...); void err_msg(const char *fmt, ...); extern int config_debug; ```
Linux kernel'inin 'tools/verification/rv/src/trace' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * trace helpers. * * Copyright (C) 2022 Red Hat Inc, Daniel Bristot de Oliveira <bristot@kernel.org> */ #include <sys/sendfile.h> #include <tracefs.h> #include <signal.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <rv.h> #include <trace.h> #incl...
Linux kernel'inin 'tools/verification/rv/src/rv' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * rv tool, the interface for the Linux kernel RV subsystem and home of * user-space controlled monitors. * * Copyright (C) 2022 Red Hat Inc, Daniel Bristot de Oliveira <bristot@kernel.org> */ #include <stdlib.h> #include <signal.h> #include <unistd.h> #include <trace.h...
Linux kernel'inin 'tools/verification/rv/src/in_kernel' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * in kernel monitor support: allows rv to control in-kernel monitors. * * Copyright (C) 2022 Red Hat Inc, Daniel Bristot de Oliveira <bristot@kernel.org> */ #include <getopt.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <errno.h> #include <unistd....
Linux kernel'inin 'tools/verification/rv/src/utils' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * util functions. * * Copyright (C) 2022 Red Hat Inc, Daniel Bristot de Oliveira <bristot@kernel.org> */ #include <stdarg.h> #include <stdio.h> #include <utils.h> int config_debug; #define MAX_MSG_LENGTH 1024 /** * err_msg - print an error message to the stderr */ v...
Linux kernel'inin 'tools/leds/uledmon' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * uledmon.c * * This program creates a new userspace LED class device and monitors it. A * timestamp and brightness value is printed each time the brightness changes. * * Usage: uledmon <device-name> * * <device-name> is the name of the LED class device to be created....
Linux kernel'inin 'tools/leds/led_hw_brightness_mon' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * led_hw_brightness_mon.c * * This program monitors LED brightness level changes having its origin * in hardware/firmware, i.e. outside of kernel control. * A timestamp and brightness value is printed each time the brightness changes. * * Usage: led_hw_brightness_mon <...
Linux kernel'inin 'tools/build/fixdep' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * "Optimize" a list of dependencies as spit out by gcc -MD * for the build framework. * * Original author: * Copyright 2002 by Kai Germaschewski <kai.germaschewski@gmx.de> * * This code has been borrowed from kbuild's fixdep (scripts/basic/fixdep.c), * Please ch...
Linux kernel'inin 'tools/build/feature/test-glibc' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <stdlib.h> #if !defined(__UCLIBC__) #include <gnu/libc-version.h> #else #define XSTR(s) STR(s) #define STR(s) #s #endif int main(void) { #if !defined(__UCLIBC__) const char *version = gnu_get_libc_version(); #else const char *version = XSTR(__GLIBC__) "." XSTR(__GLI...
Linux kernel'inin 'tools/build/feature/test-libunwind-debug-frame-arm' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <libunwind-arm.h> #include <stdlib.h> extern int UNW_OBJ(dwarf_find_debug_frame) (int found, unw_dyn_info_t *di_debug, unw_word_t ip, unw_word_t segbase, const char *obj_name, unw_word_t start, unw_word_t end); #define dwarf_find_debug_frame UNW_OBJ(dwa...
Linux kernel'inin 'tools/build/feature/test-jvmti-cmlr' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <jvmti.h> #include <jvmticmlr.h> int main(void) { jvmtiCompiledMethodLoadInlineRecord rec __attribute__((unused)); jvmtiCompiledMethodLoadRecordHeader hdr __attribute__((unused)); PCStackInfo p __attribute__((unused)); return 0; } ```
Linux kernel'inin 'tools/build/feature/test-stackprotector-all' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <stdio.h> int main(void) { return puts("hi"); } ```
Linux kernel'inin 'tools/build/feature/test-libbfd' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <bfd.h> extern int printf(const char *format, ...); int main(void) { char symbol[4096] = "FieldName__9ClassNameFd"; char *tmp; tmp = bfd_demangle(0, symbol, 0); printf("demangled symbol: {%s}\n", tmp); return 0; } ```
Linux kernel'inin 'tools/build/feature/test-libperl' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <EXTERN.h> #include <perl.h> int main(void) { perl_alloc(); return 0; } ```
Linux kernel'inin 'tools/build/feature/test-libunwind-x86_64' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <libunwind-x86_64.h> #include <stdlib.h> extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as, unw_word_t ip, unw_dyn_info_t *di, unw_proc_info_t *pi, int need_unwind_info, void *arg); #define dwarf_search...
Linux kernel'inin 'tools/build/feature/test-libnuma' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <numa.h> #include <numaif.h> int main(void) { numa_available(); return 0; } ```
Linux kernel'inin 'tools/build/feature/test-sched_getcpu' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include <sched.h> int main(void) { return sched_getcpu(); } #undef _GNU_SOURCE ```
Linux kernel'inin 'tools/build/feature/test-libbabeltrace' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <babeltrace/ctf-writer/writer.h> #include <babeltrace/ctf-ir/stream-class.h> int main(void) { bt_ctf_stream_class_get_packet_context_type((void *) 0); return 0; } ```
Linux kernel'inin 'tools/build/feature/test-compile' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <stdio.h> int main(void) { printf("Hello World!\n"); return 0; } ```
Linux kernel'inin 'tools/build/feature/test-libpython' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <Python.h> int main(void) { Py_Initialize(); return 0; } #undef _GNU_SOURCE ```
Linux kernel'inin 'tools/build/feature/test-libtracefs' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <tracefs.h> int main(void) { struct tracefs_instance *inst = tracefs_instance_create("dummy"); tracefs_instance_destroy(inst); return 0; } ```
Linux kernel'inin 'tools/build/feature/test-libelf-getshdrstrndx' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <libelf.h> int main(void) { size_t dst; return elf_getshdrstrndx(0, &dst); } ```
Linux kernel'inin 'tools/build/feature/test-disassembler-four-args' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <bfd.h> #include <dis-asm.h> int main(void) { bfd *abfd = bfd_openr(NULL, NULL); disassembler(bfd_get_arch(abfd), bfd_big_endian(abfd), bfd_get_mach(abfd), abfd); return 0; } ```
Linux kernel'inin 'tools/build/feature/test-libcapstone' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <capstone/capstone.h> int main(void) { csh handle; cs_open(CS_ARCH_X86, CS_MODE_64, &handle); return 0; } ```
Linux kernel'inin 'tools/build/feature/test-libelf-gelf_getnote' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <stdlib.h> #include <gelf.h> int main(void) { return gelf_getnote(NULL, 0, NULL, NULL, NULL) == 0; } ```
Linux kernel'inin 'tools/build/feature/test-libunwind-arm' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <libunwind-arm.h> #include <stdlib.h> extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as, unw_word_t ip, unw_dyn_info_t *di, unw_proc_info_t *pi, int need_unwind_info, void *arg); #define dwarf_search_un...
Linux kernel'inin 'tools/build/feature/test-lzma' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <lzma.h> int main(void) { lzma_stream strm = LZMA_STREAM_INIT; lzma_ret ret; ret = lzma_stream_decoder(&strm, UINT64_MAX, LZMA_CONCATENATED); return ret ? -1 : 0; } ```
Linux kernel'inin 'tools/build/feature/test-setns' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #define _GNU_SOURCE #include <sched.h> int main(void) { return setns(0, 0); } #undef _GNU_SOURCE ```
Linux kernel'inin 'tools/build/feature/test-gtk2-infobar' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #pragma GCC diagnostic ignored "-Wstrict-prototypes" #include <gtk/gtk.h> #pragma GCC diagnostic error "-Wstrict-prototypes" int main(int argc, char *argv[]) { gtk_init(&argc, &argv); gtk_info_bar_new(); return 0; } ```
Linux kernel'inin 'tools/build/feature/test-sdt' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <sys/sdt.h> int main(void) { DTRACE_PROBE(provider, name); return 0; } ```
Linux kernel'inin 'tools/build/feature/test-libtraceevent' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <trace-seq.h> int main(void) { int rv = 0; struct trace_seq s; trace_seq_init(&s); rv += !(s.state == TRACE_SEQ__GOOD); trace_seq_destroy(&s); return rv; } ```
Linux kernel'inin 'tools/build/feature/test-zlib' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <zlib.h> int main(void) { z_stream zs; inflateInit(&zs); return 0; } ```
Linux kernel'inin 'tools/build/feature/test-libunwind-aarch64' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <libunwind-aarch64.h> #include <stdlib.h> extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as, unw_word_t ip, unw_dyn_info_t *di, unw_proc_info_t *pi, int need_unwind_info, void *arg); #define dwarf_search...
Linux kernel'inin 'tools/build/feature/test-libelf-getphdrnum' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <libelf.h> int main(void) { size_t dst; return elf_getphdrnum(0, &dst); } ```
Linux kernel'inin 'tools/build/feature/test-libdebuginfod' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <elfutils/debuginfod.h> int main(void) { debuginfod_client* c = debuginfod_begin(); return !!c; } ```
Linux kernel'inin 'tools/build/feature/test-eventfd' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 // Copyright (C) 2018, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com> #include <sys/eventfd.h> int main(void) { return eventfd(0, EFD_NONBLOCK); } ```
Linux kernel'inin 'tools/build/feature/test-libdw' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <stdlib.h> #include <dwarf.h> #include <elfutils/libdw.h> #include <elfutils/libdwfl.h> #include <elfutils/version.h> int test_libdw(void) { Dwarf *dbg = dwarf_begin(0, DWARF_C_READ); return dbg == NULL; } int test_libdw_unwind(void) { /* * This function is guar...
Linux kernel'inin 'tools/build/feature/test-libbpf' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <bpf/libbpf.h> #if !defined(LIBBPF_MAJOR_VERSION) || (LIBBPF_MAJOR_VERSION < 1) #error At least libbpf 1.0 is required for Linux tools. #endif int main(void) { return bpf_object__open("test") ? 0 : -1; } ```
Linux kernel'inin 'tools/build/feature/test-cplus-demangle' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 extern int printf(const char *format, ...); extern char *cplus_demangle(const char *, int); int main(void) { char symbol[4096] = "FieldName__9ClassNameFd"; char *tmp; tmp = cplus_demangle(symbol, 0); printf("demangled symbol: {%s}\n", tmp); return 0; } ```
Linux kernel'inin 'tools/build/feature/test-libcpupower' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <cpuidle.h> int main(void) { int rv = cpuidle_state_count(0); return rv; } ```
Linux kernel'inin 'tools/build/feature/test-libcap' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <sys/capability.h> #include <linux/capability.h> int main(void) { cap_flag_value_t val; cap_t caps = cap_get_proc(); if (!caps) return 1; if (cap_get_flag(caps, CAP_SYS_ADMIN, CAP_EFFECTIVE, &val) != 0) return 1; if (cap_free(caps) != 0) return 1; retur...
Linux kernel'inin 'tools/build/feature/test-libunwind-debug-frame-aarch64' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <libunwind-aarch64.h> #include <stdlib.h> extern int UNW_OBJ(dwarf_find_debug_frame) (int found, unw_dyn_info_t *di_debug, unw_word_t ip, unw_word_t segbase, const char *obj_name, unw_word_t start, unw_word_t end); #define dwarf_find_debug_frame UNW_OBJ...
Linux kernel'inin 'tools/build/feature/test-scandirat' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include <dirent.h> int main(void) { // expects non-NULL, arg3 is 'restrict' so "pointers" have to be different return scandirat(/*dirfd=*/ 0, /*dirp=*/ (void *)1, /*namelist=*/ (void *)2, /*filter=*/ (void *)3, /*compar=*/ (void...
Linux kernel'inin 'tools/build/feature/test-libelf-zstd' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <stddef.h> #include <libelf.h> int main(void) { elf_compress(NULL, ELFCOMPRESS_ZSTD, 0); return 0; } ```
Linux kernel'inin 'tools/build/feature/test-fortify-source' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <stdio.h> int main(void) { return puts("hi"); } ```
Linux kernel'inin 'tools/build/feature/test-file-handle' alt sistemi için gerekli C kaynak kodunu implemente et.
```c #define _GNU_SOURCE #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <inttypes.h> int main(void) { struct { struct file_handle fh; uint64_t cgroup_id; } handle; int mount_id; name_to_handle_at(AT_FDCWD, "/", &handle.fh, &mount_id, 0); return 0; } ```
Linux kernel'inin 'tools/build/feature/test-numa_num_possible_cpus' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <numa.h> int main(void) { return numa_num_possible_cpus(); } ```
Linux kernel'inin 'tools/build/feature/test-libelf' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <libelf.h> int main(void) { Elf *elf = elf_begin(0, ELF_C_READ, 0); return !!elf; } ```
Linux kernel'inin 'tools/build/feature/test-jvmti' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <jvmti.h> int main(void) { JavaVM jvm __attribute__((unused)); jvmtiEventCallbacks cb __attribute__((unused)); jvmtiCapabilities caps __attribute__((unused)); jvmtiJlocationFormat format __attribute__((unused)); jvmtiEnv jvmti __attribute__((unused)); return ...
Linux kernel'inin 'tools/build/feature/test-bionic' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <android/api-level.h> int main(void) { return __ANDROID_API__; } ```
Linux kernel'inin 'tools/build/feature/test-all' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * test-all.c: Try to build all the main testcases at once. * * A well-configured system will have all the prereqs installed, so we can speed * up auto-detection on such systems. */ /* * Quirk: Python headers cannot be in arbitrary places, so keep this testcase at * th...
Linux kernel'inin 'tools/build/feature/test-libunwind-debug-frame' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <libunwind.h> #include <stdlib.h> extern int UNW_OBJ(dwarf_find_debug_frame) (int found, unw_dyn_info_t *di_debug, unw_word_t ip, unw_word_t segbase, const char *obj_name, unw_word_t start, unw_word_t end); #define dwarf_find_debug_frame UNW_OBJ(dwarf_f...
Linux kernel'inin 'tools/build/feature/test-pthread-barrier' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <stdint.h> #include <pthread.h> int main(void) { pthread_barrier_t barrier; pthread_barrier_init(&barrier, NULL, 1); pthread_barrier_wait(&barrier); return pthread_barrier_destroy(&barrier); } ```
Linux kernel'inin 'tools/build/feature/test-reallocarray' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #define _GNU_SOURCE #include <stdlib.h> int main(void) { return !!reallocarray(NULL, 1, 1); } #undef _GNU_SOURCE ```
Linux kernel'inin 'tools/build/feature/test-libaio' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <aio.h> int main(void) { struct aiocb aiocb; aiocb.aio_fildes = 0; aiocb.aio_offset = 0; aiocb.aio_buf = 0; aiocb.aio_nbytes = 0; aiocb.aio_reqprio = 0; aiocb.aio_sigevent.sigev_notify = 1 /*SIGEV_NONE*/; return (int)aio_return(&aiocb); } ```
Linux kernel'inin 'tools/build/feature/test-hello' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <stdio.h> int main(void) { return puts("hi"); } ```
Linux kernel'inin 'tools/build/feature/test-pthread-attr-setaffinity-np' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <stdint.h> #include <pthread.h> #include <sched.h> int main(void) { int ret = 0; pthread_attr_t thread_attr; cpu_set_t cs; pthread_attr_init(&thread_attr); CPU_ZERO(&cs); ret = pthread_attr_setaffinity_np(&thread_attr, sizeof(cs), &cs); return ret; } ```
Linux kernel'inin 'tools/build/feature/test-libzstd' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <zstd.h> int main(void) { ZSTD_CStream *cstream; cstream = ZSTD_createCStream(); ZSTD_freeCStream(cstream); return 0; } ```
Linux kernel'inin 'tools/build/feature/test-libunwind-x86' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <libunwind-x86.h> #include <stdlib.h> extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as, unw_word_t ip, unw_dyn_info_t *di, unw_proc_info_t *pi, int need_unwind_info, void *arg); #define dwarf_search_un...
Linux kernel'inin 'tools/build/feature/test-backtrace' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <execinfo.h> #include <stdio.h> int main(void) { void *backtrace_fns[10]; int entries; entries = backtrace(backtrace_fns, 10); backtrace_symbols_fd(backtrace_fns, entries, 1); return 0; } ```
Linux kernel'inin 'tools/build/feature/test-libopenssl' alt sistemi için gerekli C kaynak kodunu implemente et.
```c #include <openssl/ssl.h> #include <openssl/opensslv.h> int main(void) { return SSL_library_init(); } ```
Linux kernel'inin 'tools/build/feature/test-gtk2' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #pragma GCC diagnostic ignored "-Wstrict-prototypes" #include <gtk/gtk.h> #pragma GCC diagnostic error "-Wstrict-prototypes" int main(int argc, char *argv[]) { gtk_init(&argc, &argv); return 0; } ```
Linux kernel'inin 'tools/build/feature/test-libbfd-threadsafe' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <bfd.h> static bool lock(void *unused) { return true; } static bool unlock(void *unused) { return true; } int main(void) { /* Check for presence of new thread safety API (version 2.42) */ return !bfd_thread_init(lock, unlock, NULL); } ```
Linux kernel'inin 'tools/build/feature/test-libunwind' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <libunwind.h> #include <stdlib.h> extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as, unw_word_t ip, unw_dyn_info_t *di, unw_proc_info_t *p...
Linux kernel'inin 'tools/build/feature/test-timerfd' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * test for timerfd functions used by perf-kvm-stat-live */ #include <sys/timerfd.h> int main(void) { struct itimerspec new_value; int fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK); if (fd < 0) return 1; if (timerfd_settime(fd, 0, &new_value, NULL) != 0) retu...
Linux kernel'inin 'tools/build/feature/test-libpfm4' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <sys/types.h> #include <perfmon/pfmlib.h> int main(void) { pfm_initialize(); return 0; } ```
Linux kernel'inin 'tools/build/feature/test-libopencsd' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <opencsd/c_api/opencsd_c_api.h> /* * Check OpenCSD library version is sufficient to provide required features */ #define OCSD_MIN_VER ((1 << 16) | (2 << 8) | (1)) #if !defined(OCSD_VER_NUM) || (OCSD_VER_NUM < OCSD_MIN_VER) #error "OpenCSD >= 1.2.1 is required" #endif...
Linux kernel'inin 'tools/build/feature/test-libcheck' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <check.h> int main(void) { Suite *s = suite_create("test"); return s == 0; } ```
Linux kernel'inin 'tools/build/feature/test-libslang' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <slang.h> int main(void) { return SLsmg_init_smg(); } ```
Linux kernel'inin 'tools/build/feature/test-disassembler-init-styled' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <dis-asm.h> int main(void) { struct disassemble_info info; init_disassemble_info(&info, stdout, NULL, NULL); return 0; } ```
Linux kernel'inin 'tools/build/feature/test-clang-bpf-co-re' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 // Copyright (c) 2020 Facebook struct test { int a; int b; } __attribute__((preserve_access_index)); volatile struct test global_value_for_test = {}; ```
Linux kernel'inin 'tools/build/feature/test-gettid' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 // Copyright (C) 2019, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com> #define _GNU_SOURCE #include <unistd.h> int main(void) { return gettid(); } #undef _GNU_SOURCE ```
Linux kernel'inin 'tools/build/feature/test-bpf' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <asm/unistd.h> #include <linux/bpf.h> #include <unistd.h> #ifndef __NR_bpf # if defined(__i386__) # define __NR_bpf 357 # elif defined(__x86_64__) # define __NR_bpf 321 # elif defined(__aarch64__) # define __NR_bpf 280 # elif defined(__sparc__) # define __NR_bpf 34...
Linux kernel'inin 'tools/build/tests/ex/d' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 int d(void) { return 0; } ```
Linux kernel'inin 'tools/build/tests/ex/b' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 int b(void) { return 0; } ```
Linux kernel'inin 'tools/build/tests/ex/ex' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 int a(void); int b(void); int c(void); int d(void); int e(void); int f(void); int inc(void); int main(void) { a(); b(); c(); d(); e(); f(); inc(); return 0; } ```
Linux kernel'inin 'tools/build/tests/ex/c' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 int c(void) { return 0; } ```
Linux kernel'inin 'tools/build/tests/ex/inc' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #ifdef INCLUDE #include "krava.h" #endif int inc(void) { return 0; } ```
Linux kernel'inin 'tools/build/tests/ex/a' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 int a(void) { return 0; } ```
Linux kernel'inin 'tools/build/tests/ex/arch/f' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 int f(void) { return 0; } ```
Linux kernel'inin 'tools/build/tests/ex/arch/e' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 int e(void) { return 0; } ```
Linux kernel'inin 'tools/bootconfig/main' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * Boot config tool for initrd image */ #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <string.h> #include <errno.h> #include <endian.h> #include <assert.h> #include <linux/bootconfig.h> #...
Linux işletim sistemi çekirdeği için 'tools/bootconfig/include/linux/bootconfig' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #ifndef _BOOTCONFIG_LINUX_BOOTCONFIG_H #define _BOOTCONFIG_LINUX_BOOTCONFIG_H #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <stdbool.h> #include <ctype.h> #include <errno.h> #include <string.h> #ifndef fallthrough # define fallthrough #endif #define ...
Linux işletim sistemi çekirdeği için 'tools/sched_ext/scx_sdt' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* * SPDX-License-Identifier: GPL-2.0 * Copyright (c) 2025 Meta Platforms, Inc. and affiliates. * Copyright (c) 2025 Tejun Heo <tj@kernel.org> * Copyright (c) 2025 Emil Tsalapatis <etsal@meta.com> */ #pragma once #ifndef __BPF__ #define __arena #endif /* __BPF__ */ struct scx_alloc_stats { __u64 chunk_all...
Linux kernel'inin 'tools/sched_ext/scx_simple' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (c) 2022 Meta Platforms, Inc. and affiliates. * Copyright (c) 2022 Tejun Heo <tj@kernel.org> * Copyright (c) 2022 David Vernet <dvernet@meta.com> */ #include <stdio.h> #include <unistd.h> #include <signal.h> #include <assert.h> #include <libgen.h> #include ...
Linux işletim sistemi çekirdeği için 'tools/sched_ext/scx_pair' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c #ifndef __SCX_EXAMPLE_PAIR_H #define __SCX_EXAMPLE_PAIR_H enum { MAX_QUEUED = 4096, MAX_CGRPS = 4096, }; #endif /* __SCX_EXAMPLE_PAIR_H */ ```
Linux kernel'inin 'tools/sched_ext/scx_qmap.bpf' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* SPDX-License-Identifier: GPL-2.0 */ /* * A simple five-level FIFO queue scheduler. * * There are five FIFOs implemented using BPF_MAP_TYPE_QUEUE. A task gets * assigned to one depending on its compound weight. Each CPU round robins * through the FIFOs and dispatches more from FIFOs with higher indices - 1 ...
Linux kernel'inin 'tools/sched_ext/scx_userland.bpf' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* SPDX-License-Identifier: GPL-2.0 */ /* * A minimal userland scheduler. * * In terms of scheduling, this provides two different types of behaviors: * 1. A global FIFO scheduling order for _any_ tasks that have CPU affinity. * All such tasks are direct-dispatched from the kernel, and are never * enque...
Linux kernel'inin 'tools/sched_ext/scx_cpu0.bpf' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* SPDX-License-Identifier: GPL-2.0 */ /* * A CPU0 scheduler. * * This scheduler queues all tasks to a shared DSQ and only dispatches them on * CPU0 in FIFO order. This is useful for testing bypass behavior when many * tasks are concentrated on a single CPU. If the load balancer doesn't work, * bypass mode c...
Linux kernel'inin 'tools/sched_ext/scx_qmap' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (c) 2022 Meta Platforms, Inc. and affiliates. * Copyright (c) 2022 Tejun Heo <tj@kernel.org> * Copyright (c) 2022 David Vernet <dvernet@meta.com> */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <inttypes.h> #include <signal.h> #includ...
Linux kernel'inin 'tools/sched_ext/scx_simple.bpf' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* SPDX-License-Identifier: GPL-2.0 */ /* * A simple scheduler. * * By default, it operates as a simple global weighted vtime scheduler and can * be switched to FIFO scheduling. It also demonstrates the following niceties. * * - Statistics tracking how many tasks are queued to local and global dsq's. * - Te...
Linux işletim sistemi çekirdeği için 'tools/sched_ext/scx_flatcg' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c #ifndef __SCX_EXAMPLE_FLATCG_H #define __SCX_EXAMPLE_FLATCG_H enum { FCG_HWEIGHT_ONE = 1LLU << 16, }; enum fcg_stat_idx { FCG_STAT_ACT, FCG_STAT_DEACT, FCG_STAT_LOCAL, FCG_STAT_GLOBAL, FCG_STAT_HWT_UPDATES, FCG_STAT_HWT_CACHE, FCG_STAT_HWT_SKIP, FCG_STAT_HWT_RACE, FCG_STAT_ENQ_SKIP, FCG_STAT_ENQ_RA...
Linux kernel'inin 'tools/sched_ext/scx_cpu0' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (c) 2025 Meta Platforms, Inc. and affiliates. * Copyright (c) 2025 Tejun Heo <tj@kernel.org> */ #include <stdio.h> #include <unistd.h> #include <signal.h> #include <assert.h> #include <libgen.h> #include <bpf/bpf.h> #include <scx/common.h> #include "scx_cpu0...
Linux kernel'inin 'tools/sched_ext/scx_central' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (c) 2022 Meta Platforms, Inc. and affiliates. * Copyright (c) 2022 Tejun Heo <tj@kernel.org> * Copyright (c) 2022 David Vernet <dvernet@meta.com> */ #define _GNU_SOURCE #include <stdio.h> #include <unistd.h> #include <inttypes.h> #include <signal.h> #includ...
Linux kernel'inin 'tools/sched_ext/scx_userland' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* SPDX-License-Identifier: GPL-2.0 */ /* * A demo sched_ext user space scheduler which provides vruntime semantics * using a simple ordered-list implementation. * * Each CPU in the system resides in a single, global domain. This precludes * the need to do any load balancing between domains. The scheduler cou...
Linux kernel'inin 'tools/sched_ext/scx_sdt' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (c) 2024 Meta Platforms, Inc. and affiliates. * Copyright (c) 2024 Emil Tsalapatis <etsal@meta.com> * Copyright (c) 2024 Tejun Heo <tj@kernel.org> * Copyright (c) 2022 David Vernet <dvernet@meta.com> */ #include <stdio.h> #include <unistd.h> #include <sign...
Linux kernel'inin 'tools/sched_ext/scx_sdt.bpf' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* SPDX-License-Identifier: GPL-2.0 */ /* * Arena-based task data scheduler. This is a variation of scx_simple * that uses a combined allocator and indexing structure to organize * task data. Task context allocation is done when a task enters the * scheduler, while freeing is done when it exits. Task contexts ...
Linux kernel'inin 'tools/sched_ext/scx_central.bpf' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* SPDX-License-Identifier: GPL-2.0 */ /* * A central FIFO sched_ext scheduler which demonstrates the following: * * a. Making all scheduling decisions from one CPU: * * The central CPU is the only one making scheduling decisions. All other * CPUs kick the central CPU when they run out of tasks to run....
Linux kernel'inin 'tools/sched_ext/scx_pair' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (c) 2022 Meta Platforms, Inc. and affiliates. * Copyright (c) 2022 Tejun Heo <tj@kernel.org> * Copyright (c) 2022 David Vernet <dvernet@meta.com> */ #include <stdio.h> #include <unistd.h> #include <inttypes.h> #include <signal.h> #include <assert.h> #includ...