instruction
stringlengths
82
202
input
stringclasses
1 value
output
stringlengths
73
23.9M
Linux kernel'inin 'io_uring/fs' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/kernel.h> #include <linux/errno.h> #include <linux/fs.h> #include <linux/file.h> #include <linux/mm.h> #include <linux/slab.h> #include <linux/namei.h> #include <linux/io_uring.h> #include <uapi/linux/io_uring.h> #include "../fs/internal.h" #include "io_uring....
Linux kernel'inin 'io_uring/opdef' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * io_uring opcode handling table */ #include <linux/kernel.h> #include <linux/errno.h> #include <linux/fs.h> #include <linux/file.h> #include <linux/io_uring.h> #include <linux/io_uring/cmd.h> #include "io_uring.h" #include "opdef.h" #include "refs.h" #include "tctx.h" #in...
Linux kernel'inin 'io_uring/timeout' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/kernel.h> #include <linux/errno.h> #include <linux/file.h> #include <linux/io_uring.h> #include <linux/time_namespace.h> #include <trace/events/io_uring.h> #include <uapi/linux/io_uring.h> #include "io_uring.h" #include "refs.h" #include "cancel.h" #include "t...
Linux işletim sistemi çekirdeği için 'io_uring/register' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c // SPDX-License-Identifier: GPL-2.0 #ifndef IORING_REGISTER_H #define IORING_REGISTER_H int io_eventfd_unregister(struct io_ring_ctx *ctx); int io_unregister_personality(struct io_ring_ctx *ctx, unsigned id); #endif ```
Linux işletim sistemi çekirdeği için 'io_uring/kbuf' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c // SPDX-License-Identifier: GPL-2.0 #ifndef IOU_KBUF_H #define IOU_KBUF_H #include <uapi/linux/io_uring.h> #include <linux/io_uring_types.h> enum { /* ring mapped provided buffers */ IOBL_BUF_RING = 1, /* buffers are consumed incrementally rather than always fully */ IOBL_INC = 2, }; struct io_buffer_list {...
Linux kernel'inin 'io_uring/tctx' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/kernel.h> #include <linux/errno.h> #include <linux/file.h> #include <linux/mm.h> #include <linux/slab.h> #include <linux/nospec.h> #include <linux/io_uring.h> #include <uapi/linux/io_uring.h> #include "io_uring.h" #include "tctx.h" #include "bpf_filter.h" stat...
Linux kernel'inin 'io_uring/futex' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/kernel.h> #include <linux/errno.h> #include <linux/fs.h> #include <linux/file.h> #include <linux/io_uring.h> #include <uapi/linux/io_uring.h> #include "../kernel/futex/futex.h" #include "io_uring.h" #include "alloc_cache.h" #include "futex.h" struct io_futex {...
Linux işletim sistemi çekirdeği için 'io_uring/bpf-ops' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c // SPDX-License-Identifier: GPL-2.0 #ifndef IOU_BPF_OPS_H #define IOU_BPF_OPS_H #include <linux/io_uring_types.h> enum { IOU_REGION_MEM, IOU_REGION_CQ, IOU_REGION_SQ, }; struct io_uring_bpf_ops { int (*loop_step)(struct io_ring_ctx *ctx, struct iou_loop_params *lp); __u32 ring_fd; void *priv; }; #ifdef ...
Linux kernel'inin 'io_uring/xattr' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/kernel.h> #include <linux/errno.h> #include <linux/fs.h> #include <linux/file.h> #include <linux/mm.h> #include <linux/slab.h> #include <linux/namei.h> #include <linux/io_uring.h> #include <linux/xattr.h> #include <uapi/linux/io_uring.h> #include "../fs/interna...
Linux kernel'inin 'io_uring/rw' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/kernel.h> #include <linux/errno.h> #include <linux/fs.h> #include <linux/file.h> #include <linux/blk-mq.h> #include <linux/mm.h> #include <linux/slab.h> #include <linux/fsnotify.h> #include <linux/poll.h> #include <linux/nospec.h> #include <linux/compat.h> #inclu...
Linux kernel'inin 'io_uring/eventfd' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/kernel.h> #include <linux/errno.h> #include <linux/mm.h> #include <linux/slab.h> #include <linux/eventfd.h> #include <linux/eventpoll.h> #include <linux/io_uring.h> #include <linux/io_uring_types.h> #include "io-wq.h" #include "eventfd.h" struct io_ev_fd { str...
Linux kernel'inin 'io_uring/rsrc' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/kernel.h> #include <linux/errno.h> #include <linux/fs.h> #include <linux/file.h> #include <linux/mm.h> #include <linux/slab.h> #include <linux/nospec.h> #include <linux/hugetlb.h> #include <linux/compat.h> #include <linux/io_uring.h> #include <linux/io_uring/cmd....
Linux kernel'inin 'io_uring/bpf-ops' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* SPDX-License-Identifier: GPL-2.0 */ #include <linux/mutex.h> #include <linux/bpf.h> #include <linux/bpf_verifier.h> #include "io_uring.h" #include "register.h" #include "loop.h" #include "memmap.h" #include "bpf-ops.h" static DEFINE_MUTEX(io_bpf_ctrl_mutex); static const struct btf_type *loop_params_type; __...
Linux kernel'inin 'io_uring/kbuf' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/kernel.h> #include <linux/errno.h> #include <linux/fs.h> #include <linux/file.h> #include <linux/mm.h> #include <linux/slab.h> #include <linux/namei.h> #include <linux/poll.h> #include <linux/vmalloc.h> #include <linux/io_uring.h> #include <uapi/linux/io_uring.h...
Linux işletim sistemi çekirdeği için 'io_uring/poll' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/io_uring_types.h> #define IO_POLL_ALLOC_CACHE_MAX 32 enum { IO_APOLL_OK, IO_APOLL_ABORTED, IO_APOLL_READY }; struct io_poll { struct file *file; struct wait_queue_head *head; __poll_t events; int retries; struct wait_queue_entry wait; }; str...
Linux kernel'inin 'io_uring/fdinfo' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/kernel.h> #include <linux/errno.h> #include <linux/fs.h> #include <linux/file.h> #include <linux/proc_fs.h> #include <linux/seq_file.h> #include <linux/nospec.h> #include <linux/io_uring.h> #include <uapi/linux/io_uring.h> #include "filetable.h" #include "sqpol...
Linux işletim sistemi çekirdeği için 'io_uring/memmap' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #ifndef IO_URING_MEMMAP_H #define IO_URING_MEMMAP_H #define IORING_MAP_OFF_PARAM_REGION 0x20000000ULL #define IORING_MAP_OFF_ZCRX_REGION 0x30000000ULL #define IORING_OFF_ZCRX_SHIFT 16 struct page **io_pin_pages(unsigned long uaddr, unsigned long len, int *npages); #ifn...
Linux kernel'inin 'io_uring/wait' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * Waiting for completion events */ #include <linux/kernel.h> #include <linux/sched/signal.h> #include <linux/io_uring.h> #include <linux/time_namespace.h> #include <trace/events/io_uring.h> #include <uapi/linux/io_uring.h> #include "io_uring.h" #include "napi.h" #include...
Linux kernel'inin 'io_uring/truncate' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/kernel.h> #include <linux/errno.h> #include <linux/fs.h> #include <linux/file.h> #include <linux/mm.h> #include <linux/slab.h> #include <linux/syscalls.h> #include <linux/io_uring.h> #include <uapi/linux/io_uring.h> #include "../fs/internal.h" #include "io_uri...
Linux işletim sistemi çekirdeği için 'io_uring/statx' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c // SPDX-License-Identifier: GPL-2.0 int io_statx_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe); int io_statx(struct io_kiocb *req, unsigned int issue_flags); void io_statx_cleanup(struct io_kiocb *req); ```
Linux kernel'inin 'io_uring/io_uring' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * Shared application/kernel submission and completion ring pairs, for * supporting fast/efficient IO. * * A note on the read/write ordering memory barriers that are matched between * the application and kernel side. * * After the application reads the CQ ring tail, it ...
Linux kernel'inin 'io_uring/splice' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/kernel.h> #include <linux/errno.h> #include <linux/fs.h> #include <linux/file.h> #include <linux/mm.h> #include <linux/slab.h> #include <linux/namei.h> #include <linux/io_uring.h> #include <linux/splice.h> #include <uapi/linux/io_uring.h> #include "filetable.h"...
Linux işletim sistemi çekirdeği için 'io_uring/tw' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c // SPDX-License-Identifier: GPL-2.0 #ifndef IOU_TW_H #define IOU_TW_H #include <linux/sched.h> #include <linux/percpu-refcount.h> #include <linux/io_uring_types.h> #define IO_LOCAL_TW_DEFAULT_MAX 20 /* * Terminate the request if either of these conditions are true: * * 1) It's being executed by the original...
Linux kernel'inin 'lib/string' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * linux/lib/string.c * * Copyright (C) 1991, 1992 Linus Torvalds */ /* * This file should be used only for "library" routines that may have * alternative implementations on specific architectures (generally * found in <asm-xx/string.h>), or get overloaded by FORTIF...
Linux kernel'inin 'lib/ubsan' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only /* * UBSAN error reporting functions * * Copyright (c) 2014 Samsung Electronics Co., Ltd. * Author: Andrey Ryabinin <ryabinin.a.a@gmail.com> */ #include <linux/bitops.h> #include <linux/bug.h> #include <linux/ctype.h> #include <linux/init.h> #include <linux/kernel.h> ...
Linux kernel'inin 'lib/syscall' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/ptrace.h> #include <linux/sched.h> #include <linux/sched/task_stack.h> #include <linux/export.h> #include <asm/syscall.h> static int collect_syscall(struct task_struct *target, struct syscall_info *info) { unsigned long args[6] = { }; struct pt_regs *regs; i...
Linux kernel'inin 'lib/refcount' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * Out-of-line refcount functions. */ #include <linux/mutex.h> #include <linux/refcount.h> #include <linux/spinlock.h> #include <linux/bug.h> #define REFCOUNT_WARN(str) WARN_ONCE(1, "refcount_t: " str ".\n") void refcount_warn_saturate(refcount_t *r, enum refcount_saturat...
Linux kernel'inde 'lib/bootconfig-data' modülü için gerekli Low-Level Assembly kodunu yaz.
```assembly /* SPDX-License-Identifier: GPL-2.0 */ /* * Embed default bootconfig in the kernel. */ .section .init.rodata, "aw" .global embedded_bootconfig_data embedded_bootconfig_data: .incbin "lib/default.bconf" .global embedded_bootconfig_data_end embedded_bootconfig_data_end: ```
Linux işletim sistemi çekirdeği için 'lib/test_hmm_uapi' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * This is a module to test the HMM (Heterogeneous Memory Management) API * of the kernel. It allows a userspace program to expose its entire address * space through the HMM test module device file. */ #ifndef _LIB_TEST_HMM_UAPI_H #define _LIB_TE...
Linux işletim sistemi çekirdeği için 'lib/locking-selftest-wlock' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #undef LOCK #define LOCK WL #undef UNLOCK #define UNLOCK WU #undef RLOCK #define RLOCK RL #undef WLOCK #define WLOCK WL #undef INIT #define INIT RWI ```
Linux kernel'inin 'lib/muldi3' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /* */ #include <linux/export.h> #include <linux/libgcc.h> #define W_TYPE_SIZE 32 #define __ll_B ((unsigned long) 1 << (W_TYPE_SIZE / 2)) #define __ll_lowpart(t) ((unsigned long) (t) & (__ll_B - 1)) #define __ll_highpart(t) ((unsigned long) (t) >> (W_TYPE_SIZE / 2)) ...
Linux kernel'inin 'lib/find_bit_benchmark' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only /* * Test for find_*_bit functions. * * Copyright (c) 2017 Cavium. */ /* * find_bit functions are widely used in kernel, so the successful boot * is good enough test for correctness. * * This test is focused on performance of traversing bitmaps. Two typical * scen...
Linux kernel'inin 'lib/errname' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/build_bug.h> #include <linux/errno.h> #include <linux/errname.h> #include <linux/kernel.h> #include <linux/math.h> /* * Ensure these tables do not accidentally become gigantic if some * huge errno makes it in. On most architectures, the first table will * onl...
Linux kernel'inin 'lib/irq_poll' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * Functions related to interrupt-poll handling in the block layer. This * is similar to NAPI for network devices. */ #include <linux/kernel.h> #include <linux/module.h> #include <linux/init.h> #include <linux/bio.h> #include <linux/interrupt.h> #include <linux/cpu.h> #incl...
Linux kernel'inin 'lib/uuid' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only /* * Unified UUID/GUID definition * * Copyright (C) 2009, 2016 Intel Corp. * Huang Ying <ying.huang@intel.com> */ #include <linux/kernel.h> #include <linux/ctype.h> #include <linux/errno.h> #include <linux/export.h> #include <linux/hex.h> #include <linux/uuid.h> #incl...
Linux kernel'inin 'lib/decompress_inflate' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #ifdef STATIC #define PREBOOT /* Pre-boot environment: included */ /* prevent inclusion of _LINUX_KERNEL_H in pre-boot environment: lots * errors about console_printk etc... on ARM */ #define _LINUX_KERNEL_H #include "zlib_inflate/inftrees.c" #include "zlib_inflate/inffast.c"...
Linux kernel'inin 'lib/checksum' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /* * * INET An implementation of the TCP/IP protocol suite for the LINUX * operating system. INET is implemented using the BSD Socket * interface as the means of communication with the user level. * * IP/TCP/UDP checksumming routines * * Authors: Jorge Cwi...
Linux işletim sistemi çekirdeği için 'lib/locking-selftest-spin' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #undef LOCK #define LOCK L #undef UNLOCK #define UNLOCK U #undef RLOCK #undef WLOCK #undef INIT #define INIT SI ```
Linux kernel'inin 'lib/asn1_decoder' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /* Decoder for ASN.1 BER/DER/CER encoded bytestream * * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) */ #include <linux/export.h> #include <linux/kernel.h> #include <linux/errno.h> #include <linux/module.h> ...
Linux kernel'inin 'lib/base64' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * base64.c - Base64 with support for multiple variants * * Copyright (c) 2020 Hannes Reinecke, SUSE * * Based on the base64url routines from fs/crypto/fname.c * (which are using the URL-safe Base64 encoding), * modified to support multiple Base64 variants. */ #includ...
Linux kernel'inin 'lib/rcuref' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only /* * rcuref - A scalable reference count implementation for RCU managed objects * * rcuref is provided to replace open coded reference count implementations * based on atomic_t. It protects explicitely RCU managed objects which can * be visible even after the last ref...
Linux kernel'inin 'lib/bch' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* * Generic binary BCH encoding/decoding library * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published by * the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but ...
Linux kernel'inin 'lib/is_single_threaded' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /* Function to determine if a thread group is single threaded or not * * Copyright (C) 2008 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) * - Derived from security/selinux/hooks.c */ #include <linux/sched/signal.h> #include <li...
Linux kernel'inin 'lib/fault-inject-usercopy' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only #include <linux/fault-inject.h> #include <linux/fault-inject-usercopy.h> static struct { struct fault_attr attr; } fail_usercopy = { .attr = FAULT_ATTR_INITIALIZER, }; static int __init setup_fail_usercopy(char *str) { return setup_fault_attr(&fail_usercopy.attr, str);...
Linux işletim sistemi çekirdeği için 'lib/locking-selftest-rlock' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #undef LOCK #define LOCK RL #undef UNLOCK #define UNLOCK RU #undef RLOCK #define RLOCK RL #undef WLOCK #define WLOCK WL #undef INIT #define INIT RWI ```
Linux kernel'inin 'lib/test_firmware' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only /* * This module provides an interface to trigger and test firmware loading. * * It is designed to be used for basic evaluation of the firmware loading * subsystem (for example when validating firmware verification). It lacks * any extra dependencies, and will not norm...
Linux kernel'inin 'lib/llist' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only /* * Lock-less NULL terminated single linked list * * The basic atomic operation of this list is cmpxchg on long. On * architectures that don't have NMI-safe cmpxchg implementation, the * list can NOT be used in NMI handlers. So code that uses the list in * an NMI h...
Linux kernel'inin 'lib/test_maple_tree' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0+ /* * test_maple_tree.c: Test the maple tree API * Copyright (c) 2018-2022 Oracle Corporation * Author: Liam R. Howlett <liam@infradead.org> * * Any tests that only require the interface of the tree. */ #include <linux/maple_tree.h> #include <linux/module.h> #include <lin...
Linux kernel'inin 'lib/strncpy_from_user' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/compiler.h> #include <linux/export.h> #include <linux/fault-inject-usercopy.h> #include <linux/kasan-checks.h> #include <linux/thread_info.h> #include <linux/uaccess.h> #include <linux/kernel.h> #include <linux/errno.h> #include <linux/mm.h> #include <asm/byteor...
Linux kernel'inin 'lib/genalloc' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only /* * Basic general purpose allocator for managing special purpose * memory, for example, memory that is not managed by the regular * kmalloc/kfree interface. Uses for this includes on-device special * memory, uncached memory etc. * * It is safe to use the allocator i...
Linux kernel'inin 'lib/ucs2_string' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/ucs2_string.h> #include <linux/module.h> /* Return the number of unicode characters in data */ unsigned long ucs2_strnlen(const ucs2_char_t *s, size_t maxlength) { unsigned long length = 0; while (*s++ != 0 && length < maxlength) ...
Linux kernel'inin 'lib/kobject_uevent' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * kernel userspace event delivery * * Copyright (C) 2004 Red Hat, Inc. All rights reserved. * Copyright (C) 2004 Novell, Inc. All rights reserved. * Copyright (C) 2004 IBM, Inc. All rights reserved. * * Authors: * Robert Love <rml@novell.com> * Kay Sievers <kay.s...
Linux kernel'inin 'lib/oid_registry' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /* ASN.1 Object identifier (OID) registry * * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved. * Written by David Howells (dhowells@redhat.com) */ #include <linux/module.h> #include <linux/export.h> #include <linux/oid_registry.h> #include <linux/kernel.h> #in...
Linux kernel'inin 'lib/test_hmm' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * This is a module to test the HMM (Heterogeneous Memory Management) * mirror and zone device private memory migration APIs of the kernel. * Userspace programs can register with the driver to mirror their own address * space and can use the device to read/write any valid ...
Linux kernel'inin 'lib/logic_iomem' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * Copyright (C) 2021 Intel Corporation * Author: Johannes Berg <johannes@sipsolutions.net> */ #include <linux/types.h> #include <linux/slab.h> #include <linux/logic_iomem.h> #include <asm/io.h> struct logic_iomem_region { const struct resource *res; const struct logic_i...
Linux kernel'inin 'lib/decompress_bunzip2' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* Small bzip2 deflate implementation, by Rob Landley (rob@landley.net). Based on bzip2 decompression code by Julian R Seward (jseward@acm.org), which also acknowledges contributions by Mike Burrows, David Wheeler, Peter Fenwick, Alistair Moffat, Radford Neal, Ian H. Witten, Robert Sedgewick, and Jon L. Bentl...
Linux kernel'inin 'lib/list_sort' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/compiler.h> #include <linux/export.h> #include <linux/list_sort.h> #include <linux/list.h> /* * Returns a list organized in an intermediate format suited * to chaining of merge() calls: null-terminated, no reserved or * sentinel head node, "prev" links not ma...
Linux kernel'inin 'lib/lockref' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/export.h> #include <linux/lockref.h> #if USE_CMPXCHG_LOCKREF /* * Note that the "cmpxchg()" reloads the "old" value for the * failure case. */ #define CMPXCHG_LOOP(CODE, SUCCESS) do { \ int retry = 100; \ struct lockref old; \ BUILD_BUG_ON...
Linux kernel'inin 'lib/test_kmod' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later OR copyleft-next-0.3.1 /* * kmod stress test driver * * Copyright (C) 2017 Luis R. Rodriguez <mcgrof@kernel.org> */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt /* * This driver provides an interface to trigger and test the kernel's * module loader through a serie...
Linux kernel'inin 'lib/packing_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2024, Vladimir Oltean <olteanv@gmail.com> * Copyright (c) 2024, Intel Corporation. */ #include <kunit/test.h> #include <linux/packing.h> struct packing_test_case { const char *desc; const u8 *pbuf; size_t pbuf_size; u64 uval; size_t start_bit; size_t en...
Linux kernel'inin 'lib/kstrtox' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * Convert integer string representation to an integer. * If an integer doesn't fit into specified type, -E is returned. * * Integer starts with optional sign. * kstrtou*() functions do not accept sign "-". * * Radix 0 means autodetection: leading "0x" implies radix 16,...
Linux kernel'inin 'lib/logic_pio' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0+ /* * Copyright (C) 2017 HiSilicon Limited, All Rights Reserved. * Author: Gabriele Paoloni <gabriele.paoloni@huawei.com> * Author: Zhichang Yuan <yuanzhichang@hisilicon.com> * Author: John Garry <john.garry@huawei.com> */ #define pr_fmt(fmt) "LOGIC PIO: " fmt #include <l...
Linux kernel'inin 'lib/once' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/slab.h> #include <linux/spinlock.h> #include <linux/once.h> #include <linux/random.h> #include <linux/module.h> struct once_work { struct work_struct work; struct static_key_true *key; struct module *module; }; static void once_deferred(struct work_struct *w...
Linux kernel'inin 'lib/ctype' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * linux/lib/ctype.c * * Copyright (C) 1991, 1992 Linus Torvalds */ #include <linux/ctype.h> #include <linux/compiler.h> #include <linux/export.h> const unsigned char _ctype[] = { _C,_C,_C,_C,_C,_C,_C,_C, /* 0-7 */ _C,_C|_S,_C|_S,_C|_S,_C|_S,_C|_S,_C,_C, /* 8-15 ...
Linux işletim sistemi çekirdeği için 'lib/locking-selftest-hardirq' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #undef IRQ_DISABLE #undef IRQ_ENABLE #undef IRQ_ENTER #undef IRQ_EXIT #define IRQ_ENABLE HARDIRQ_ENABLE #define IRQ_DISABLE HARDIRQ_DISABLE #define IRQ_ENTER HARDIRQ_ENTER #define IRQ_EXIT HARDIRQ_EXIT ```
Linux kernel'inin 'lib/test_vmalloc' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * Test module for stress and analyze performance of vmalloc allocator. * (C) 2018 Uladzislau Rezki (Sony) <urezki@gmail.com> */ #include <linux/init.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/vmalloc.h> #include <linux/random.h> #include <linux...
Linux kernel'inin 'lib/radix-tree' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2001 Momchil Velikov * Portions Copyright (C) 2001 Christoph Hellwig * Copyright (C) 2005 SGI, Christoph Lameter * Copyright (C) 2006 Nick Piggin * Copyright (C) 2012 Konstantin Khlebnikov * Copyright (C) 2016 Intel, Matthew Wilcox * Copyright ...
Linux kernel'inin 'lib/percpu_counter' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * Fast batching percpu counters. */ #include <linux/percpu_counter.h> #include <linux/mutex.h> #include <linux/init.h> #include <linux/cpu.h> #include <linux/module.h> #include <linux/debugobjects.h> #ifdef CONFIG_HOTPLUG_CPU static LIST_HEAD(percpu_counters); static DEFI...
Linux kernel'inin 'lib/audit' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/init.h> #include <linux/types.h> #include <linux/audit.h> #include <asm/unistd.h> static unsigned dir_class[] = { #include <asm-generic/audit_dir_write.h> ~0U }; static unsigned read_class[] = { #include <asm-generic/audit_read.h> ~0U }; static unsigned write_...
Linux kernel'inin 'lib/strnlen_user' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/kernel.h> #include <linux/export.h> #include <linux/uaccess.h> #include <linux/mm.h> #include <linux/bitops.h> #include <asm/word-at-a-time.h> /* * Do a strnlen, return length of string *with* final '\0'. * 'count' is the user-supplied count, while 'max' is t...
Linux kernel'inin 'lib/decompress_unxz' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: 0BSD /* * Wrapper for decompressing XZ-compressed kernel, initramfs, and initrd * * Author: Lasse Collin <lasse.collin@tukaani.org> */ /* * Important notes about in-place decompression * * At least on x86, the kernel is decompressed in place: the compressed data * is placed to...
Linux kernel'inin 'lib/plist' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /* * lib/plist.c * * Descending-priority-sorted double-linked list * * (C) 2002-2003 Intel Corp * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>. * * 2001-2005 (c) MontaVista Software, Inc. * Daniel Walker <dwalker@mvista.com> * * (C) 2005 Linutronix G...
Linux işletim sistemi çekirdeği için 'lib/kstrtox' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #ifndef _LIB_KSTRTOX_H #define _LIB_KSTRTOX_H #define KSTRTOX_OVERFLOW (1U << 31) const char *_parse_integer_fixup_radix(const char *s, unsigned int *base); unsigned int _parse_integer_limit(const char *s, unsigned int base, unsigned long long *res, size_t max_chars); ...
Linux kernel'inin 'lib/locking-selftest' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * lib/locking-selftest.c * * Testsuite for various locking APIs: spinlocks, rwlocks, * mutexes and rw-semaphores. * * It is checking both false positives and false negatives. * * Started by Ingo Molnar: * * Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redha...
Linux kernel'inin 'lib/parman' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* * lib/parman.c - Manager for linear priority array areas * Copyright (c) 2017 Mellanox Technologies. All rights reserved. * Copyright (c) 2017 Jiri Pirko <jiri@mellanox.com> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following con...
Linux kernel'inin 'lib/bcd' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/bcd.h> #include <linux/export.h> unsigned _bcd2bin(unsigned char val) { return (val & 0x0f) + (val >> 4) * 10; } EXPORT_SYMBOL(_bcd2bin); unsigned char _bin2bcd(unsigned val) { const unsigned int t = (val * 103) >> 10; return (t << 4) | (val - t * 10); } EX...
Linux kernel'inin 'lib/dec_and_lock' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/export.h> #include <linux/spinlock.h> #include <linux/atomic.h> /* * This is an implementation of the notion of "decrement a * reference count, and return locked if it decremented to zero". * * NOTE NOTE NOTE! This is _not_ equivalent to * * if (atomic_dec...
Linux kernel'inin 'lib/pm-notifier-error-inject' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only #include <linux/kernel.h> #include <linux/module.h> #include <linux/suspend.h> #include "notifier-error-inject.h" static int priority; module_param(priority, int, 0); MODULE_PARM_DESC(priority, "specify PM notifier priority"); static struct notifier_err_inject pm_notifie...
Linux kernel'inin 'lib/digsig' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2011 Nokia Corporation * Copyright (C) 2011 Intel Corporation * * Author: * Dmitry Kasatkin <dmitry.kasatkin@nokia.com> * <dmitry.kasatkin@intel.com> * * File: sign.c * implements signature (RSA) verification * pkcs decoding is b...
Linux kernel'inin 'lib/dynamic_queue_limits' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * Dynamic byte queue limits. See include/linux/dynamic_queue_limits.h * * Copyright (c) 2011, Tom Herbert <therbert@google.com> */ #include <linux/types.h> #include <linux/kernel.h> #include <linux/jiffies.h> #include <linux/dynamic_queue_limits.h> #include <linux/compil...
Linux işletim sistemi çekirdeği için 'lib/test_fpu' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0+ */ #ifndef _LIB_TEST_FPU_H #define _LIB_TEST_FPU_H int test_fpu(void); #endif ```
Linux kernel'inin 'lib/netdev-notifier-error-inject' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only #include <linux/kernel.h> #include <linux/module.h> #include <linux/netdevice.h> #include "notifier-error-inject.h" static int priority; module_param(priority, int, 0); MODULE_PARM_DESC(priority, "specify netdevice notifier priority"); static struct notifier_err_inject n...
Linux kernel'inin 'lib/inflate' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #define DEBG(x) #define DEBG1(x) /* inflate.c -- Not copyrighted 1992 by Mark Adler version c10p1, 10 January 1993 */ /* * Adapted for booting Linux by Hannu Savolainen 1993 * based on gzip-1.0.3 * * Nicolas Pitre <nico@fluxnic.net>, 1999/04/14 : * Little mods for a...
Linux kernel'inin 'lib/test_objagg' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 /* Copyright (c) 2018 Mellanox Technologies. All rights reserved */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include <linux/kernel.h> #include <linux/module.h> #include <linux/slab.h> #include <linux/random.h> #include <linux/objagg.h> struct tokey { unsi...
Linux kernel'inin 'lib/usercopy' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/compiler.h> #include <linux/errno.h> #include <linux/export.h> #include <linux/fault-inject-usercopy.h> #include <linux/instrumented.h> #include <linux/kernel.h> #include <linux/nospec.h> #include <linux/string.h> #include <linux/uaccess.h> #include <linux/wordpa...
Linux kernel'inin 'lib/decompress_unlz4' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only /* * Wrapper for decompressing LZ4-compressed kernel, initramfs, and initrd * * Copyright (C) 2013, LG Electronics, Kyungsik Lee <kyungsik.lee@lge.com> */ #ifdef STATIC #define PREBOOT #include "lz4/lz4_decompress.c" #else #include <linux/decompress/unlz4.h> #endif #in...
Linux kernel'inin 'lib/sys_info' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only #include <linux/array_size.h> #include <linux/bitops.h> #include <linux/cleanup.h> #include <linux/console.h> #include <linux/log2.h> #include <linux/kernel.h> #include <linux/ftrace.h> #include <linux/nmi.h> #include <linux/sched/debug.h> #include <linux/string.h> #include...
Linux kernel'inin 'lib/nlattr' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * NETLINK Netlink attributes * * Authors: Thomas Graf <tgraf@suug.ch> * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> */ #include <linux/export.h> #include <linux/kernel.h> #include <linux/errno.h> #include <linux/jiffies.h> #include <linux/nospec.h> #include <linu...
Linux kernel'inin 'lib/lshrdi3' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /* * lib/lshrdi3.c */ #include <linux/module.h> #include <linux/libgcc.h> long long notrace __lshrdi3(long long u, word_type b) { DWunion uu, w; word_type bm; if (b == 0) return u; uu.ll = u; bm = 32 - b; if (bm <= 0) { w.s.high = 0; w.s.low = (unsign...
Linux kernel'inin 'lib/test_dynamic_debug' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only /* * Kernel module for testing dynamic_debug * * Authors: * Jim Cromie <jim.cromie@gmail.com> */ #define pr_fmt(fmt) "test_dd: " fmt #include <linux/module.h> /* run tests by reading or writing sysfs node: do_prints */ static void do_prints(void); /* device un...
Linux kernel'inin 'lib/decompress_unzstd' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * Important notes about in-place decompression * * At least on x86, the kernel is decompressed in place: the compressed data * is placed to the end of the output buffer, and the decompressor overwrites * most of the compressed data. There must be enough safety margin to...
Linux işletim sistemi çekirdeği için 'lib/locking-selftest-wsem' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #undef LOCK #define LOCK WSL #undef UNLOCK #define UNLOCK WSU #undef RLOCK #define RLOCK RSL #undef WLOCK #define WLOCK WSL #undef INIT #define INIT RWSI ```
Linux kernel'inin 'lib/test_context-analysis' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only /* * Compile-only tests for common patterns that should not generate false * positive errors when compiled with Clang's context analysis. */ #include <linux/bit_spinlock.h> #include <linux/build_bug.h> #include <linux/local_lock.h> #include <linux/mutex.h> #include <lin...
Linux kernel'inin 'lib/bootconfig' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * Extra Boot Config * Masami Hiramatsu <mhiramat@kernel.org> */ /* * NOTE: This is only for tools/bootconfig, because tools/bootconfig will * run the parser sanity test. * This does NOT mean lib/bootconfig.c is available in the user space. * However, if you change thi...
Linux işletim sistemi çekirdeği için 'lib/notifier-error-inject' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0 */ #include <linux/atomic.h> #include <linux/debugfs.h> #include <linux/notifier.h> struct notifier_err_inject_action { unsigned long val; int error; const char *name; }; #define NOTIFIER_ERR_INJECT_ACTION(action) \ .name = #action, .val = (action), struct notifier_err_in...
Linux kernel'inin 'lib/cache_maint' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * Generic support for Memory System Cache Maintenance operations. * * Coherency maintenance drivers register with this simple framework that will * iterate over each registered instance to first kick off invalidation and * then to wait until it is complete. * * If no i...
Linux kernel'inin 'lib/ts_kmp' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /* * lib/ts_kmp.c Knuth-Morris-Pratt text search implementation * * Authors: Thomas Graf <tgraf@suug.ch> * * ========================================================================== * * Implements a linear-time string-matching algorithm due to Knuth, * M...
Linux kernel'inin 'lib/test_bitmap' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only /* * Test cases for bitmap API. */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt #include <linux/bitmap.h> #include <linux/init.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/printk.h> #include <linux/slab.h> #include <linux/string.h> #include <lin...
Linux kernel'inin 'lib/maple_tree' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0+ /* * Maple Tree implementation * Copyright (c) 2018-2022 Oracle Corporation * Authors: Liam R. Howlett <liam@infradead.org> * Matthew Wilcox <willy@infradead.org> * Copyright (c) 2023 ByteDance * Author: Peng Zhang <zhangpeng.00@bytedance.com> */ /* * DOC: Interest...
Linux kernel'inin 'lib/dhry_run' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only /* * Dhrystone benchmark test module * * Copyright (C) 2022 Glider bv */ #include "dhry.h" #include <linux/kernel.h> #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/smp.h> #define DHRY_VAX 1757 static int dhry_run_set(const char *val, const ...