instruction
stringlengths
82
202
input
stringclasses
1 value
output
stringlengths
73
23.9M
Linux kernel'inin 'tools/testing/selftests/thermal/intel/workload_hint/workload_hint_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #define _GNU_SOURCE #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <poll.h> #include <signal.h> #define WORKLOAD_NOTIFICATION_DELAY_ATTRIBUTE "/sys/bus/pci/devices/0000:00:04.0/workload_hint/notification_delay_ms" #d...
Linux kernel'inin 'tools/testing/selftests/thermal/intel/power_floor/power_floor_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #define _GNU_SOURCE #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <poll.h> #include <signal.h> #define POWER_FLOOR_ENABLE_ATTRIBUTE "/sys/bus/pci/devices/0000:00:04.0/power_limits/power_floor_enable" #define POWER_F...
Linux kernel'inin 'tools/testing/selftests/move_mount_set_group/move_mount_set_group_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #define _GNU_SOURCE #include <sched.h> #include <stdio.h> #include <errno.h> #include <string.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/mount.h> #include <sys/wait.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <stdbool.h> #include <st...
Linux kernel'inin 'tools/testing/selftests/ptrace/vmaccess' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0+ /* * Copyright (c) 2020 Bernd Edlinger <bernd.edlinger@hotmail.de> * All rights reserved. * * Check whether /proc/$pid/mem can be accessed without causing deadlocks * when de_thread is blocked with ->cred_guard_mutex held. */ #include "kselftest_harness.h" #include <stdi...
Linux kernel'inin 'tools/testing/selftests/ptrace/set_syscall_info' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0+ /* * Copyright (c) 2018-2025 Dmitry V. Levin <ldv@strace.io> * All rights reserved. * * Check whether PTRACE_SET_SYSCALL_INFO semantics implemented in the kernel * matches userspace expectations. */ #include "kselftest_harness.h" #include <err.h> #include <fcntl.h> #incl...
Linux kernel'inin 'tools/testing/selftests/ptrace/get_set_sud' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #define _GNU_SOURCE #include "kselftest_harness.h" #include <stdio.h> #include <string.h> #include <errno.h> #include <sys/wait.h> #include <sys/syscall.h> #include <sys/prctl.h> #include "linux/ptrace.h" static int sys_ptrace(int request, pid_t pid, void *addr, void *data) { ...
Linux kernel'inin 'tools/testing/selftests/ptrace/peeksiginfo' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #define _GNU_SOURCE #include <stdio.h> #include <signal.h> #include <unistd.h> #include <errno.h> #include <linux/types.h> #include <sys/wait.h> #include <sys/syscall.h> #include <sys/user.h> #include <sys/mman.h> #include "linux/ptrace.h" static int sys_rt_sigqueueinfo(pid_t ...
Linux kernel'inin 'tools/testing/selftests/ptrace/get_syscall_info' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0+ /* * Copyright (c) 2018 Dmitry V. Levin <ldv@altlinux.org> * All rights reserved. * * Check whether PTRACE_GET_SYSCALL_INFO semantics implemented in the kernel * matches userspace expectations. */ #include "kselftest_harness.h" #include <err.h> #include <signal.h> #inclu...
Linux kernel'inin 'tools/testing/selftests/namespaces/listns_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #define _GNU_SOURCE #include <errno.h> #include <fcntl.h> #include <limits.h> #include <sched.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <linux/nsfs.h> #include <sys/ioctl.h> #include <sys/socket.h> #include <sys/stat.h> #include <sys/syscall.h> #incl...
Linux kernel'inin 'tools/testing/selftests/namespaces/init_ino_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later // Copyright (c) 2025 Christian Brauner <brauner@kernel.org> #define _GNU_SOURCE #include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <sys/stat.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <linux/nsfs.h> #include "kselftest_harn...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/namespaces/wrappers' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/nsfs.h> #include <linux/types.h> #include <sys/syscall.h> #include <unistd.h> #ifndef __SELFTESTS_NAMESPACES_WRAPPERS_H__ #define __SELFTESTS_NAMESPACES_WRAPPERS_H__ #ifndef __NR_listns #if defined __alpha__ #define __NR_listns 580 #elif defined _MIPS_SIM ...
Linux kernel'inin 'tools/testing/selftests/namespaces/listns_pagination_bug' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #define _GNU_SOURCE #include <errno.h> #include <sched.h> #include <stdio.h> #include <stdlib.h> #include <sys/socket.h> #include <sys/wait.h> #include <unistd.h> #include "../kselftest_harness.h" #include "../filesystems/utils.h" #include "wrappers.h" /* * Minimal test case t...
Linux kernel'inin 'tools/testing/selftests/namespaces/file_handle_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #define _GNU_SOURCE #include <errno.h> #include <fcntl.h> #include <grp.h> #include <limits.h> #include <sched.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/mount.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/wait.h> #include <unistd...
Linux kernel'inin 'tools/testing/selftests/namespaces/listns_efault_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #define _GNU_SOURCE #include <errno.h> #include <fcntl.h> #include <limits.h> #include <sched.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <linux/nsfs.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <sys/mount.h> #include <s...
Linux kernel'inin 'tools/testing/selftests/namespaces/siocgskns_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #define _GNU_SOURCE #include <errno.h> #include <fcntl.h> #include <limits.h> #include <sched.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/ioctl.h> #include <sys/socket.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/wait.h> #include ...
Linux kernel'inin 'tools/testing/selftests/namespaces/ns_active_ref_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #define _GNU_SOURCE #include <errno.h> #include <fcntl.h> #include <limits.h> #include <sched.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <linux/nsfs.h> #include <sys/mount.h> #include <sys/socket.h> #include <sys/stat.h> #include <sys/types.h> #includ...
Linux kernel'inin 'tools/testing/selftests/namespaces/stress_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #define _GNU_SOURCE #include <errno.h> #include <fcntl.h> #include <limits.h> #include <sched.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/ioctl.h> #include <sys/socket.h> #include <sys/stat.h> #include <sys/syscall.h> #include <sys/types.h> #inclu...
Linux kernel'inin 'tools/testing/selftests/namespaces/listns_permissions_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #define _GNU_SOURCE #include <errno.h> #include <fcntl.h> #include <limits.h> #include <sched.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <linux/nsfs.h> #include <sys/capability.h> #include <sys/ioctl.h> #include <sys/prctl.h> #include <sys/stat.h> #in...
Linux kernel'inin 'tools/testing/selftests/namespaces/cred_change_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #define _GNU_SOURCE #include <errno.h> #include <fcntl.h> #include <limits.h> #include <sched.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/capability.h> #include <sys/ioctl.h> #include <sys/stat.h> #include <sys/syscall.h> #include <sys/types.h> #i...
Linux kernel'inin 'tools/testing/selftests/namespaces/regression_pidfd_setns_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #define _GNU_SOURCE #include <errno.h> #include <sched.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/socket.h> #include <unistd.h> #include "../pidfd/pidfd.h" #include "../kselftest_harness.h" /* * Regression tests for the setn...
Linux kernel'inin 'tools/testing/selftests/namespaces/nsid_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <assert.h> #include <fcntl.h> #include <inttypes.h> #include <libgen.h> #include <limits.h> #include <pthread.h> #include <signal.h> #include <string.h> #include <sys/mount.h> #include <poll.h> #include <sys/epoll.h> #include <sys/resource.h> #include <sys/stat.h> #inc...
Linux kernel'inin 'tools/testing/selftests/sync/sync_merge' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* * sync fence merge tests * Copyright 2015-2016 Collabora Ltd. * * Based on the implementation from the Android Open Source Project, * * Copyright 2012 Google, Inc * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/sync/sw_sync' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* * sw_sync abstraction * * Copyright 2015-2016 Collabora Ltd. * * Based on the implementation from the Android Open Source Project, * * Copyright 2013 Google, Inc * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files...
Linux kernel'inin 'tools/testing/selftests/sync/sync_stress_consumer' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* * sync stress test: producer/consumer * Copyright 2015-2016 Collabora Ltd. * * Based on the implementation from the Android Open Source Project, * * Copyright 2012 Google, Inc * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated docume...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/sync/sync' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* * sync abstraction * Copyright 2015-2016 Collabora Ltd. * * Based on the implementation from the Android Open Source Project, * * Copyright 2012 Google, Inc * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the ...
Linux kernel'inin 'tools/testing/selftests/sync/sync' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* * sync / sw_sync abstraction * Copyright 2015-2016 Collabora Ltd. * * Based on the implementation from the Android Open Source Project, * * Copyright 2012 Google, Inc * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation f...
Linux kernel'inin 'tools/testing/selftests/sync/sync_stress_parallelism' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* * sync stress test: parallelism * Copyright 2015-2016 Collabora Ltd. * * Based on the implementation from the Android Open Source Project, * * Copyright 2012 Google, Inc * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentatio...
Linux kernel'inin 'tools/testing/selftests/sync/sync_fence' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* * sync fence tests with one timeline * Copyright 2015-2016 Collabora Ltd. * * Based on the implementation from the Android Open Source Project, * * Copyright 2012 Google, Inc * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documen...
Linux kernel'inin 'tools/testing/selftests/sync/sync_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* * sync test runner * Copyright 2015-2016 Collabora Ltd. * * Based on the implementation from the Android Open Source Project, * * Copyright 2012 Google, Inc * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the ...
Linux kernel'inin 'tools/testing/selftests/sync/sync_alloc' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* * sync allocation tests * Copyright 2015-2016 Collabora Ltd. * * Based on the implementation from the Android Open Source Project, * * Copyright 2012 Google, Inc * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files ...
Linux kernel'inin 'tools/testing/selftests/sync/sync_wait' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* * sync fence wait tests * Copyright 2015-2016 Collabora Ltd. * * Based on the implementation from the Android Open Source Project, * * Copyright 2012 Google, Inc * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files ...
Linux kernel'inin 'tools/testing/selftests/sync/sync_stress_merge' alt sistemi için gerekli C kaynak kodunu implemente et.
```c /* * sync stress test: merging * Copyright 2015-2016 Collabora Ltd. * * Based on the implementation from the Android Open Source Project, * * Copyright 2012 Google, Inc * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation fi...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/sync/synctest' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* * sync tests * Copyright 2015-2016 Collabora Ltd. * * Based on the implementation from the Android Open Source Project, * * Copyright 2012 Google, Inc * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Softw...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-arm64' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ /* * rseq-arm64.h * * (C) Copyright 2016-2022 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> * (C) Copyright 2018 - Will Deacon <will.deacon@arm.com> */ /* * aarch64 -mbig-endian generates mixed endianness code vs data: * little-endian code and big-endia...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-generic-thread-pointer' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1-only OR MIT */ /* * rseq-generic-thread-pointer.h * * (C) Copyright 2021 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> */ #ifndef _RSEQ_GENERIC_THREAD_POINTER #define _RSEQ_GENERIC_THREAD_POINTER #ifdef __cplusplus extern "C" { #endif /* Use gcc builtin thread poi...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-ppc' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ /* * rseq-ppc.h * * (C) Copyright 2016-2022 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> * (C) Copyright 2016-2018 - Boqun Feng <boqun.feng@gmail.com> */ /* * RSEQ_SIG is used with the following trap instruction: * * powerpc-be: 0f e5 00 0b ...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-bits-reset' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ /* * rseq-bits-reset.h * * (C) Copyright 2016-2022 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> */ #undef RSEQ_TEMPLATE_IDENTIFIER #undef RSEQ_TEMPLATE_CPU_ID_FIELD #undef RSEQ_TEMPLATE_CPU_ID_OFFSET #undef RSEQ_TEMPLATE_SUFFIX ```
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-bits-template' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ /* * rseq-bits-template.h * * (C) Copyright 2016-2022 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> */ #ifdef RSEQ_TEMPLATE_CPU_ID # define RSEQ_TEMPLATE_CPU_ID_OFFSET RSEQ_CPU_ID_OFFSET # define RSEQ_TEMPLATE_CPU_ID_FIELD cpu_id # ifdef RSEQ_TEMPLATE_MO_R...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-arm-bits' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ /* * rseq-arm-bits.h * * (C) Copyright 2016-2022 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> */ #include "rseq-bits-template.h" #if defined(RSEQ_TEMPLATE_MO_RELAXED) && \ (defined(RSEQ_TEMPLATE_CPU_ID) || defined(RSEQ_TEMPLATE_MM_CID)) static inline _...
Linux kernel'inin 'tools/testing/selftests/rseq/param_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: LGPL-2.1 #define _GNU_SOURCE #include <assert.h> #include <linux/membarrier.h> #include <pthread.h> #include <sched.h> #include <stdatomic.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <syscall.h> #include <unistd.h> #include <poll.h> #includ...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-riscv-bits' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ #include "rseq-bits-template.h" #if defined(RSEQ_TEMPLATE_MO_RELAXED) && \ (defined(RSEQ_TEMPLATE_CPU_ID) || defined(RSEQ_TEMPLATE_MM_CID)) static inline __always_inline int RSEQ_TEMPLATE_IDENTIFIER(rseq_cmpeqv_storev)(intptr_t *v, intptr_t expect, intptr_t newv, ...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-mips' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ /* * Author: Paul Burton <paul.burton@mips.com> * (C) Copyright 2018 MIPS Tech LLC * (C) Copyright 2016-2022 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> */ /* * RSEQ_SIG uses the break instruction. The instruction pattern is: * * On MIPS: * 0350000d ...
Linux kernel'inin 'tools/testing/selftests/rseq/basic_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: LGPL-2.1 /* * Basic test coverage for critical regions and rseq_current_cpu(). */ #define _GNU_SOURCE #include <assert.h> #include <sched.h> #include <signal.h> #include <stdio.h> #include <string.h> #include <sys/time.h> #include "rseq.h" void test_cpu_pointer(void) { cpu_set_t a...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-ppc-thread-pointer' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1-only OR MIT */ /* * rseq-ppc-thread-pointer.h * * (C) Copyright 2021 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> */ #ifndef _RSEQ_PPC_THREAD_POINTER #define _RSEQ_PPC_THREAD_POINTER #ifdef __cplusplus extern "C" { #endif static inline void *rseq_thread_pointer(v...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-abi' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ #ifndef _RSEQ_ABI_H #define _RSEQ_ABI_H /* * rseq-abi.h * * Restartable sequences system call API * * Copyright (c) 2015-2022 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> */ #include <linux/types.h> #include <asm/byteorder.h> enum rseq_...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-arm' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ /* * rseq-arm.h * * (C) Copyright 2016-2022 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> */ /* * - ARM little endian * * RSEQ_SIG uses the udf A32 instruction with an uncommon immediate operand * value 0x5de3. This traps if user-space reaches this ins...
Linux kernel'inin 'tools/testing/selftests/rseq/basic_percpu_ops_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: LGPL-2.1 #define _GNU_SOURCE #include <assert.h> #include <pthread.h> #include <sched.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stddef.h> #include "kselftest.h" #include "rseq.h" #ifdef BUILDOPT_RSEQ_PERCPU_MM_CID # define RSEQ_PERCPU ...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-x86-bits' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ /* * rseq-x86-bits.h * * (C) Copyright 2016-2022 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> */ #include "rseq-bits-template.h" #ifdef __x86_64__ #if defined(RSEQ_TEMPLATE_MO_RELAXED) && \ (defined(RSEQ_TEMPLATE_CPU_ID) || defined(RSEQ_TEMPLATE_MM_CID...
Linux kernel'inin 'tools/testing/selftests/rseq/rseq' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: LGPL-2.1 /* * rseq.c * * Copyright (C) 2016 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; on...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-s390-bits' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ #include "rseq-bits-template.h" #if defined(RSEQ_TEMPLATE_MO_RELAXED) && \ (defined(RSEQ_TEMPLATE_CPU_ID) || defined(RSEQ_TEMPLATE_MM_CID)) static inline __attribute__((always_inline)) int RSEQ_TEMPLATE_IDENTIFIER(rseq_cmpeqv_storev)(intptr_t *v, intptr_t expect, ...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-or1k-bits' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ #include "rseq-bits-template.h" #if defined(RSEQ_TEMPLATE_MO_RELAXED) && \ (defined(RSEQ_TEMPLATE_CPU_ID) || defined(RSEQ_TEMPLATE_MM_CID)) static inline __always_inline int RSEQ_TEMPLATE_IDENTIFIER(rseq_cmpeqv_storev)(intptr_t *v, intptr_t expect, intptr_t newv, ...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-or1k' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ /* * Select the instruction "l.nop 0x35" as the RSEQ_SIG. */ #define RSEQ_SIG 0x15000035 #define rseq_smp_mb() __asm__ __volatile__ ("l.msync" ::: "memory") #define rseq_smp_rmb() rseq_smp_mb() #define rseq_smp_wmb() rseq_smp_mb() #define RSEQ_ASM_TMP_REG_1 "r31...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-thread-pointer' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1-only OR MIT */ /* * rseq-thread-pointer.h * * (C) Copyright 2021 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> */ #ifndef _RSEQ_THREAD_POINTER #define _RSEQ_THREAD_POINTER #if defined(__x86_64__) || defined(__i386__) #include "rseq-x86-thread-pointer.h" #elif defin...
Linux kernel'inin 'tools/testing/selftests/rseq/check_optimized' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: LGPL-2.1 #define _GNU_SOURCE #include <assert.h> #include <sched.h> #include <signal.h> #include <stdio.h> #include <string.h> #include <sys/time.h> #include "rseq.h" int main(int argc, char **argv) { if (__rseq_register_current_thread(true, false)) return -1; return 0; } ```
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-x86-thread-pointer' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1-only OR MIT */ /* * rseq-x86-thread-pointer.h * * (C) Copyright 2021 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> */ #ifndef _RSEQ_X86_THREAD_POINTER #define _RSEQ_X86_THREAD_POINTER #include <features.h> #ifdef __cplusplus extern "C" { #endif #if __GNUC_PREREQ ...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-mips-bits' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ /* * Author: Paul Burton <paul.burton@mips.com> * (C) Copyright 2018 MIPS Tech LLC * (C) Copyright 2016-2022 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> */ #include "rseq-bits-template.h" #if defined(RSEQ_TEMPLATE_MO_RELAXED) && \ (defined(RSEQ_TEMPLAT...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/compiler' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1-only OR MIT */ /* * rseq/compiler.h * * Work-around asm goto compiler bugs. * * (C) Copyright 2021 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> */ #ifndef RSEQ_COMPILER_H #define RSEQ_COMPILER_H /* * gcc prior to 4.8.2 miscompiles asm goto. * https://gcc.gnu.o...
Linux kernel'inin 'tools/testing/selftests/rseq/slice_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: LGPL-2.1 #define _GNU_SOURCE #include <assert.h> #include <pthread.h> #include <sched.h> #include <signal.h> #include <stdbool.h> #include <stdio.h> #include <string.h> #include <syscall.h> #include <unistd.h> #include <linux/prctl.h> #include <sys/prctl.h> #include <sys/time.h> #incl...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-riscv' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ /* * Select the instruction "csrw mhartid, x0" as the RSEQ_SIG. Unlike * other architectures, the ebreak instruction has no immediate field for * distinguishing purposes. Hence, ebreak is not suitable as RSEQ_SIG. * "csrw mhartid, x0" can also satisfy the RSEQ req...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-s390' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ /* * RSEQ_SIG uses the trap4 instruction. As Linux does not make use of the * access-register mode nor the linkage stack this instruction will always * cause a special-operation exception (the trap-enabled bit in the DUCT * is and will stay 0). The instruction pa...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-x86' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ /* * rseq-x86.h * * (C) Copyright 2016-2022 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> */ #ifndef RSEQ_H #error "Never use <rseq-x86.h> directly; include <rseq.h> instead." #endif #include <stdint.h> /* * RSEQ_SIG is used with the following reserved ...
Linux kernel'inin 'tools/testing/selftests/rseq/syscall_errors_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: MIT // SPDX-FileCopyrightText: 2024 Michael Jeanson <mjeanson@efficios.com> #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif #include <assert.h> #include <stdint.h> #include <syscall.h> #include <string.h> #include <unistd.h> #include "rseq.h" static int sys_rseq(void *rseq_abi, uint3...
Linux kernel'inin 'tools/testing/selftests/rseq/legacy_check' 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 <errno.h> #include <signal.h> #include <stdint.h> #include <unistd.h> #include "rseq.h" #include "../kselftest_harness.h" FIXTURE(legacy) { }; static int cpu_id_in_sigfn = -1; static void sigfn(int sig) { struct rseq...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ /* * rseq.h * * (C) Copyright 2016-2018 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> */ #ifndef RSEQ_H #define RSEQ_H #include <assert.h> #include <stdint.h> #include <stdbool.h> #include <pthread.h> #include <signal.h> #include <sched.h> #include <errno...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-ppc-bits' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ /* * rseq-ppc-bits.h * * (C) Copyright 2016-2018 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> * (C) Copyright 2016-2018 - Boqun Feng <boqun.feng@gmail.com> */ #include "rseq-bits-template.h" #if defined(RSEQ_TEMPLATE_MO_RELAXED) && \ (defined(RSEQ_TEMP...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-or1k-thread-pointer' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1-only OR MIT */ #ifndef _RSEQ_OR1K_THREAD_POINTER #define _RSEQ_OR1K_THREAD_POINTER static inline void *rseq_thread_pointer(void) { void *__thread_register; __asm__ ("l.or %0, r10, r0" : "=r" (__thread_register)); return __thread_register; } #endif ```
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/rseq/rseq-arm64-bits' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: LGPL-2.1 OR MIT */ /* * rseq-arm64-bits.h * * (C) Copyright 2016-2022 - Mathieu Desnoyers <mathieu.desnoyers@efficios.com> * (C) Copyright 2018 - Will Deacon <will.deacon@arm.com> */ #include "rseq-bits-template.h" #if defined(RSEQ_TEMPLATE_MO_RELAXED) && \ (defined(RSEQ_TEMPLAT...
Linux kernel'inin 'tools/testing/selftests/kselftest_harness/harness-selftest' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <stdio.h> #include <sys/resource.h> #include <sys/prctl.h> /* Avoid any inconsistencies */ #define TH_LOG_STREAM stdout #include "kselftest_harness.h" static void test_helper(struct __test_metadata *_metadata) { ASSERT_EQ(0, 0); } TEST(standalone_pass) { TH_LOG(...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/futex/include/futextest' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0-or-later */ /****************************************************************************** * * Copyright © International Business Machines Corp., 2009 * * DESCRIPTION * Glibc independent futex library for testing kernel functionality. * * AUTHOR * Darren Ha...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/futex/include/atomic' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0-or-later */ /****************************************************************************** * * Copyright © International Business Machines Corp., 2009 * * DESCRIPTION * GCC atomic builtin wrappers * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins....
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/futex/include/futex2test' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0-or-later */ /* * Futex2 library addons for futex tests * * Copyright 2021 Collabora Ltd. */ #include <linux/time_types.h> #include <stdint.h> #define u64_to_ptr(x) ((void *)(uintptr_t)(x)) #ifndef __NR_futex_waitv #define __NR_futex_waitv 449 struct futex_waitv { __u64 va...
Linux kernel'inin 'tools/testing/selftests/futex/functional/futex_wait_uninitialized_heap' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /****************************************************************************** * * Copyright FUJITSU LIMITED 2010 * Copyright KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> * * DESCRIPTION * Wait on uninitialized heap. It shold be zero and FUTEX_WAIT shoul...
Linux kernel'inin 'tools/testing/selftests/futex/functional/futex_requeue_pi' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /****************************************************************************** * * Copyright © International Business Machines Corp., 2006-2008 * * DESCRIPTION * This test excercises the futex syscall op codes needed for requeuing * priority inherita...
Linux kernel'inin 'tools/testing/selftests/futex/functional/futex_wait_private_mapped_file' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /****************************************************************************** * * Copyright FUJITSU LIMITED 2010 * Copyright KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> * * DESCRIPTION * Internally, Futex has two handling mode, anon and file. The priva...
Linux kernel'inin 'tools/testing/selftests/futex/functional/futex_waitv' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /* * futex_waitv() test by André Almeida <andrealmeid@collabora.com> * * Copyright 2021 Collabora Ltd. */ #include <errno.h> #include <error.h> #include <getopt.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <pthread.h> #in...
Linux kernel'inin 'tools/testing/selftests/futex/functional/futex_requeue_pi_mismatched_ops' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /****************************************************************************** * * Copyright © International Business Machines Corp., 2009 * * DESCRIPTION * 1. Block a thread using FUTEX_WAIT * 2. Attempt to use FUTEX_CMP_REQUEUE_PI on the futex from...
Linux kernel'inin 'tools/testing/selftests/futex/functional/robust_list' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2025 Igalia S.L. * * Robust list test by André Almeida <andrealmeid@igalia.com> * * The robust list uAPI allows userspace to create "robust" locks, in the sense * that if the lock holder thread dies, the remaining threads that are waiting * for...
Linux kernel'inin 'tools/testing/selftests/futex/functional/futex_numa' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <pthread.h> #include <sys/shm.h> #include <sys/mman.h> #include <fcntl.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <assert.h> #include "futextest.h" #include "futex2test.h" typedef u_int32_t u32; typedef int32_t s32; typ...
Linux kernel'inin 'tools/testing/selftests/futex/functional/futex_wait_wouldblock' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /****************************************************************************** * * Copyright © International Business Machines Corp., 2009 * * DESCRIPTION * Test if FUTEX_WAIT op returns -EWOULDBLOCK if the futex value differs * from the expected one...
Linux kernel'inin 'tools/testing/selftests/futex/functional/futex_numa_mpol' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2025 Sebastian Andrzej Siewior <bigeasy@linutronix.de> */ #define _GNU_SOURCE #include <errno.h> #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #ifdef LIBNUMA_VER_SUFFICIENT #include <numa.h> #include <numaif.h> #e...
Linux kernel'inin 'tools/testing/selftests/futex/functional/futex_priv_hash' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2025 Sebastian Andrzej Siewior <bigeasy@linutronix.de> */ #define _GNU_SOURCE #include <errno.h> #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <linux/prctl.h> #include <sys/prctl.h> #include "kselftest_...
Linux kernel'inin 'tools/testing/selftests/futex/functional/futex_wait_timeout' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /****************************************************************************** * * Copyright © International Business Machines Corp., 2009 * * DESCRIPTION * Block on a futex and wait for timeout. * * AUTHOR * Darren Hart <dvhart@linux.intel.com> *...
Linux kernel'inin 'tools/testing/selftests/futex/functional/futex_requeue' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright Collabora Ltd., 2021 * * futex cmp requeue test by André Almeida <andrealmeid@collabora.com> */ #include <pthread.h> #include <limits.h> #include "futextest.h" #include "kselftest_harness.h" #define timeout_ns 30000000 #define WAKE_WAIT_US 10000 ...
Linux kernel'inin 'tools/testing/selftests/futex/functional/futex_requeue_pi_signal_restart' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /****************************************************************************** * * Copyright © International Business Machines Corp., 2006-2008 * * DESCRIPTION * This test exercises the futex_wait_requeue_pi() signal handling both * before and after ...
Linux kernel'inin 'tools/testing/selftests/futex/functional/futex_wait' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright Collabora Ltd., 2021 * * futex cmp requeue test by André Almeida <andrealmeid@collabora.com> */ #include <pthread.h> #include <sys/shm.h> #include <sys/mman.h> #include <fcntl.h> #include "futextest.h" #include "kselftest_harness.h" #define timeout...
Linux kernel'inin 'tools/testing/selftests/watchdog/watchdog-test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * Watchdog Driver Test Program * - Tests all ioctls * - Tests Magic Close - CONFIG_WATCHDOG_NOWAYOUT * - Could be tested against softdog driver on systems that * don't have watchdog hardware. * - TODO: * - Enhance test to add coverage for WDIOC_GETTEMP. * * Reference: Docum...
Linux kernel'inin 'tools/testing/selftests/sparc64/drivers/adi-test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 /* * selftest for sparc64's privileged ADI driver * * Author: Tom Hromatka <tom.hromatka@oracle.com> */ #include <linux/kernel.h> #include <errno.h> #include <fcntl.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/syscall.h> #in...
Linux kernel'inin 'tools/testing/selftests/ir/ir_loopback' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 // test ir decoder // // Copyright (C) 2018 Sean Young <sean@mess.org> // When sending LIRC_MODE_SCANCODE, the IR will be encoded. rc-loopback // will send this IR to the receiver side, where we try to read the decoded // IR. Decoding happens in a separate kernel thread, so we ...
Linux kernel'inin 'tools/testing/selftests/vfio/vfio_dma_mapping_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only #include <stdio.h> #include <sys/mman.h> #include <unistd.h> #include <linux/iommufd.h> #include <linux/limits.h> #include <linux/mman.h> #include <linux/sizes.h> #include <linux/vfio.h> #include <libvfio.h> #include "kselftest_harness.h" static const char *device_bdf; ...
Linux kernel'inin 'tools/testing/selftests/vfio/vfio_pci_device_init_perf_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only #include <pthread.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <linux/sizes.h> #include <linux/time64.h> #include <linux/vfio.h> #include <libvfio.h> #include "../kselftest_harness.h" static char **device_bdfs; static int nr_devices; struct thread_args { s...
Linux kernel'inin 'tools/testing/selftests/vfio/vfio_pci_driver_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only #include <sys/ioctl.h> #include <sys/mman.h> #include <linux/sizes.h> #include <linux/vfio.h> #include <libvfio.h> #include "kselftest_harness.h" static const char *device_bdf; #define ASSERT_NO_MSI(_eventfd) do { \ u64 __value; \ \ ASSERT_EQ(-1, read(_e...
Linux kernel'inin 'tools/testing/selftests/vfio/vfio_pci_device_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only #include <fcntl.h> #include <stdlib.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <linux/limits.h> #include <linux/pci_regs.h> #include <linux/sizes.h> #include <linux/vfio.h> #include <libvfio.h> #include "kselftest_harness.h" static const char *device_bdf;...
Linux kernel'inin 'tools/testing/selftests/vfio/vfio_dma_mapping_mmio_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only #include <stdio.h> #include <sys/mman.h> #include <unistd.h> #include <uapi/linux/types.h> #include <linux/pci_regs.h> #include <linux/sizes.h> #include <linux/vfio.h> #include <libvfio.h> #include "../kselftest_harness.h" static const char *device_bdf; static struct v...
Linux kernel'inin 'tools/testing/selftests/vfio/vfio_iommufd_setup_test' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0 #include <linux/limits.h> #include <linux/sizes.h> #include <linux/vfio.h> #include <linux/iommufd.h> #include <stdint.h> #include <stdio.h> #include <sys/ioctl.h> #include <unistd.h> #include <libvfio.h> #include "kselftest_harness.h" static const char iommu_dev_path[] = "/d...
Linux kernel'inin 'tools/testing/selftests/vfio/lib/vfio_pci_device' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only #include <dirent.h> #include <fcntl.h> #include <libgen.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/eventfd.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <linux/align.h> #include <linux/iommufd.h> #include <l...
Linux kernel'inin 'tools/testing/selftests/vfio/lib/vfio_pci_driver' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only #include "kselftest.h" #include <libvfio.h> #ifdef __x86_64__ extern struct vfio_pci_driver_ops dsa_ops; extern struct vfio_pci_driver_ops ioat_ops; #endif static struct vfio_pci_driver_ops *driver_ops[] = { #ifdef __x86_64__ &dsa_ops, &ioat_ops, #endif }; void vfio_pc...
Linux kernel'inin 'tools/testing/selftests/vfio/lib/iommu' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only #include <dirent.h> #include <fcntl.h> #include <libgen.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/eventfd.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <linux/limits.h> #include <linux/mman.h> #include <lin...
Linux kernel'inin 'tools/testing/selftests/vfio/lib/libvfio' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only #include <stdio.h> #include <stdlib.h> #include <sys/mman.h> #include <linux/align.h> #include "../../../kselftest.h" #include <libvfio.h> static bool is_bdf(const char *str) { unsigned int s, b, d, f; int length, count; count = sscanf(str, "%4x:%2x:%2x.%2x%n", &s, ...
Linux kernel'inin 'tools/testing/selftests/vfio/lib/iova_allocator' alt sistemi için gerekli C kaynak kodunu implemente et.
```c // SPDX-License-Identifier: GPL-2.0-only #include <dirent.h> #include <fcntl.h> #include <libgen.h> #include <stdint.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/eventfd.h> #include <sys/ioctl.h> #include <sys/mman.h> #include <linux/iommufd.h> #include <linux/limits.h> #include <...
Linux işletim sistemi çekirdeği için 'tools/testing/selftests/vfio/lib/include/libvfio' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz.
```c /* SPDX-License-Identifier: GPL-2.0-only */ #ifndef SELFTESTS_VFIO_LIB_INCLUDE_LIBVFIO_H #define SELFTESTS_VFIO_LIB_INCLUDE_LIBVFIO_H #include <libvfio/assert.h> #include <libvfio/iommu.h> #include <libvfio/iova_allocator.h> #include <libvfio/vfio_pci_device.h> #include <libvfio/vfio_pci_driver.h> /* * Return t...