instruction stringlengths 82 202 | input stringclasses 1
value | output stringlengths 73 23.9M |
|---|---|---|
Linux kernel'inin 'lib/dim/net_dim' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
/*
* Copyright (c) 2018, Mellanox Technologies inc. All rights reserved.
*/
#include <linux/dim.h>
#include <linux/rtnetlink.h>
/*
* Net DIM profiles:
* There are different set of profiles for each CQ period mode.
* There are different set o... | |
Linux kernel'inin 'lib/dim/dim' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
/*
* Copyright (c) 2019, Mellanox Technologies inc. All rights reserved.
*/
#include <linux/dim.h>
bool dim_on_top(struct dim *dim)
{
switch (dim->tune_state) {
case DIM_PARKING_ON_TOP:
case DIM_PARKING_TIRED:
return true;
case DIM_GOING_RIGHT:
retur... | |
Linux kernel'inin 'lib/dim/rdma_dim' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
/*
* Copyright (c) 2019, Mellanox Technologies inc. All rights reserved.
*/
#include <linux/dim.h>
static int rdma_dim_step(struct dim *dim)
{
if (dim->tune_state == DIM_GOING_RIGHT) {
if (dim->profile_ix == (RDMA_DIM_PARAMS_NUM_PROFILES - 1))
return D... | |
Linux kernel'inin 'lib/vdso/datastore' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include <linux/gfp.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/time_namespace.h>
#include <linux/types.h>
#include <linux/vdso_datastore.h>
#include <vdso/datapage.h>
static u8 vdso_initdata[VDSO_NR_PAGES * PAGE_SIZE] __aligned(PAGE_SIZE) __initdata ... | |
Linux kernel'inin 'lib/vdso/getrandom' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2022-2024 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
*/
#include <linux/array_size.h>
#include <linux/minmax.h>
#include <vdso/datapage.h>
#include <vdso/getrandom.h>
#include <vdso/limits.h>
#include <vdso/unaligned.h>
#include <asm/barrier... | |
Linux kernel'inin 'lib/vdso/gettimeofday' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Generic userspace implementations of gettimeofday() and similar.
*/
#include <vdso/auxclock.h>
#include <vdso/clocksource.h>
#include <vdso/datapage.h>
#include <vdso/helpers.h>
#include <vdso/ktime.h>
#include <vdso/limits.h>
#include <vdso/math64.h>
#include <vdso/time3... | |
Linux kernel'inin 'lib/kunit/string-stream' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* C++ stream style string builder used in KUnit for building messages.
*
* Copyright (C) 2019, Google LLC.
* Author: Brendan Higgins <brendanhiggins@google.com>
*/
#include <kunit/static_stub.h>
#include <kunit/test.h>
#include <linux/list.h>
#include <linux/slab.h>
#i... | |
Linux kernel'inin 'lib/kunit/executor' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/reboot.h>
#include <kunit/test.h>
#include <kunit/attributes.h>
#include <linux/glob.h>
#include <linux/moduleparam.h>
/*
* These symbols point to the .kunit_test_suites section and are defined in
* include/asm-generic/vmlinux.lds.h, and consequently must be ... | |
Linux kernel'inin 'lib/kunit/executor_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* KUnit test for the KUnit executor.
*
* Copyright (C) 2021, Google LLC.
* Author: Daniel Latypov <dlatypov@google.com>
*/
#include <kunit/test.h>
#include <kunit/attributes.h>
static void free_suite_set_at_end(struct kunit *test, const void *to_free);
static struct ku... | |
Linux kernel'inin 'lib/kunit/platform-test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* KUnit test for KUnit platform driver infrastructure.
*/
#include <linux/platform_device.h>
#include <kunit/platform_device.h>
#include <kunit/test.h>
/*
* Test that kunit_platform_device_alloc() creates a platform device.
*/
static void kunit_platform_device_alloc_te... | |
Linux kernel'inin 'lib/kunit/user_alloc' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* KUnit userspace memory allocation resource management.
*/
#include <kunit/resource.h>
#include <kunit/test.h>
#include <linux/kthread.h>
#include <linux/mm.h>
struct kunit_vm_mmap_resource {
unsigned long addr;
size_t size;
};
/* vm_mmap() arguments */
struct kunit_vm... | |
Linux kernel'inin 'lib/kunit/try-catch' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* An API to allow a function, that may fail, to be executed, and recover in a
* controlled manner.
*
* Copyright (C) 2019, Google LLC.
* Author: Brendan Higgins <brendanhiggins@google.com>
*/
#include <kunit/test.h>
#include <linux/completion.h>
#include <linux/kernel.... | |
Linux işletim sistemi çekirdeği için 'lib/kunit/string-stream' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* C++ stream style string builder used in KUnit for building messages.
*
* Copyright (C) 2019, Google LLC.
* Author: Brendan Higgins <brendanhiggins@google.com>
*/
#ifndef _KUNIT_STRING_STREAM_H
#define _KUNIT_STRING_STREAM_H
#include <linux/spinlock.h>
#include <li... | |
Linux kernel'inin 'lib/kunit/hooks' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* KUnit 'Hooks' implementation.
*
* This file contains code / structures which should be built-in even when
* KUnit itself is built as a module.
*
* Copyright (C) 2022, Google LLC.
* Author: David Gow <davidgow@google.com>
*/
#include <kunit/test-bug.h>
DEFINE_STAT... | |
Linux kernel'inin 'lib/kunit/resource' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* KUnit resource API for test managed resources (allocations, etc.).
*
* Copyright (C) 2022, Google LLC.
* Author: Daniel Latypov <dlatypov@google.com>
*/
#include <kunit/resource.h>
#include <kunit/test.h>
#include <linux/kref.h>
/*
* Used for static resources and wh... | |
Linux kernel'inin 'lib/kunit/static_stub' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* KUnit function redirection (static stubbing) API.
*
* Copyright (C) 2022, Google LLC.
* Author: David Gow <davidgow@google.com>
*/
#include <kunit/test.h>
#include <kunit/static_stub.h>
#include "hooks-impl.h"
/* Context for a static stub. This is stored in the reso... | |
Linux işletim sistemi çekirdeği için 'lib/kunit/debugfs' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2020, Oracle and/or its affiliates.
*/
#ifndef _KUNIT_DEBUGFS_H
#define _KUNIT_DEBUGFS_H
#include <kunit/test.h>
#ifdef CONFIG_KUNIT_DEBUGFS
void kunit_debugfs_create_suite(struct kunit_suite *suite);
void kunit_debugfs_destroy_suite(struct kunit_suit... | |
Linux kernel'inin 'lib/kunit/device' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* KUnit-managed device implementation
*
* Implementation of struct kunit_device helpers for fake devices whose
* lifecycle is managed by KUnit.
*
* Copyright (C) 2023, Google LLC.
* Author: David Gow <davidgow@google.com>
*/
#include <linux/device.h>
#include <linux/... | |
Linux işletim sistemi çekirdeği için 'lib/kunit/device-impl' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* KUnit internal header for device helpers
*
* Header for KUnit-internal driver / bus management.
*
* Copyright (C) 2023, Google LLC.
* Author: David Gow <davidgow@google.com>
*/
#ifndef _KUNIT_DEVICE_IMPL_H
#define _KUNIT_DEVICE_IMPL_H
// For internal use only --... | |
Linux kernel'inin 'lib/kunit/test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Base unit test (KUnit) API.
*
* Copyright (C) 2019, Google LLC.
* Author: Brendan Higgins <brendanhiggins@google.com>
*/
#include <kunit/resource.h>
#include <kunit/test.h>
#include <kunit/test-bug.h>
#include <kunit/attributes.h>
#include <linux/kernel.h>
#include <l... | |
Linux işletim sistemi çekirdeği için 'lib/kunit/try-catch-impl' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Internal kunit try catch implementation to be shared with tests.
*
* Copyright (C) 2019, Google LLC.
* Author: Brendan Higgins <brendanhiggins@google.com>
*/
#ifndef _KUNIT_TRY_CATCH_IMPL_H
#define _KUNIT_TRY_CATCH_IMPL_H
#include <kunit/try-catch.h>
#include <lin... | |
Linux kernel'inin 'lib/kunit/kunit-example-test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Example KUnit test to show how to use KUnit.
*
* Copyright (C) 2019, Google LLC.
* Author: Brendan Higgins <brendanhiggins@google.com>
*/
#include <kunit/test.h>
#include <kunit/static_stub.h>
/*
* This is the most fundamental element of KUnit, the test case. A test... | |
Linux kernel'inin 'lib/kunit/assert' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Assertion and expectation serialization API.
*
* Copyright (C) 2019, Google LLC.
* Author: Brendan Higgins <brendanhiggins@google.com>
*/
#include <kunit/assert.h>
#include <kunit/test.h>
#include <kunit/visibility.h>
#include "string-stream.h"
void kunit_assert_prol... | |
Linux kernel'inin 'lib/kunit/kunit-test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* KUnit test for core test infrastructure.
*
* Copyright (C) 2019, Google LLC.
* Author: Brendan Higgins <brendanhiggins@google.com>
*/
#include "linux/gfp_types.h"
#include <kunit/test.h>
#include <kunit/test-bug.h>
#include <kunit/static_stub.h>
#include <linux/device... | |
Linux kernel'inin 'lib/kunit/attributes' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* KUnit API to save and access test attributes
*
* Copyright (C) 2023, Google LLC.
* Author: Rae Moar <rmoar@google.com>
*/
#include <kunit/test.h>
#include <kunit/attributes.h>
/* Options for printing attributes:
* PRINT_ALWAYS - attribute is printed for every test c... | |
Linux kernel'inin 'lib/kunit/string-stream-test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* KUnit test for struct string_stream.
*
* Copyright (C) 2019, Google LLC.
* Author: Brendan Higgins <brendanhiggins@google.com>
*/
#include <kunit/static_stub.h>
#include <kunit/test.h>
#include <linux/ktime.h>
#include <linux/prandom.h>
#include <linux/slab.h>
#includ... | |
Linux kernel'inin 'lib/kunit/assert_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* KUnit test for the assertion formatting functions.
* Author: Ivan Orlov <ivan.orlov0322@gmail.com>
*/
#include <kunit/test.h>
#include "string-stream.h"
#define TEST_PTR_EXPECTED_BUF_SIZE 32
#define HEXDUMP_TEST_BUF_LEN 5
#define ASSERT_TEST_EXPECT_CONTAIN(test... | |
Linux kernel'inin 'lib/kunit/debugfs' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (c) 2020, Oracle and/or its affiliates.
* Author: Alan Maguire <alan.maguire@oracle.com>
*/
#include <linux/debugfs.h>
#include <linux/module.h>
#include <kunit/test.h>
#include <kunit/test-bug.h>
#include "string-stream.h"
#include "debugfs.h"
#define K... | |
Linux kernel'inin 'lib/kunit/platform' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Test managed platform driver
*/
#include <linux/completion.h>
#include <linux/device/bus.h>
#include <linux/device/driver.h>
#include <linux/platform_device.h>
#include <kunit/platform_device.h>
#include <kunit/resource.h>
struct kunit_platform_device_alloc_params {
c... | |
Linux işletim sistemi çekirdeği için 'lib/kunit/hooks-impl' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Declarations for hook implementations.
*
* These will be set as the function pointers in struct kunit_hook_table,
* found in include/kunit/test-bug.h.
*
* Copyright (C) 2023, Google LLC.
* Author: David Gow <davidgow@google.com>
*/
#ifndef _KUNIT_HOOKS_IMPL_H
#d... | |
Linux işletim sistemi çekirdeği için 'lib/zlib_inflate/infutil' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* infutil.h -- types and macros common to blocks and codes
* Copyright (C) 1995-1998 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* WARNING: this file should *not* be used by applications. It is
part of the implementation of the compression library and is
subj... | |
Linux işletim sistemi çekirdeği için 'lib/zlib_inflate/inftrees' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
#ifndef INFTREES_H
#define INFTREES_H
/* inftrees.h -- header to use inftrees.c
* Copyright (C) 1995-2005 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* WARNING: this file should *not* be used by applications. It is
part of the implementation of the compression li... | |
Linux kernel'inin 'lib/zlib_inflate/inflate' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
/* inflate.c -- zlib decompression
* Copyright (C) 1995-2005 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*
* Based on zlib 1.2.3 but modified for the Linux Kernel by
* Richard Purdie <richard@openedhand.com>
*
* Changes mainly for static instead of dynamic memory allo... | |
Linux işletim sistemi çekirdeği için 'lib/zlib_inflate/inflate' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
#ifndef INFLATE_H
#define INFLATE_H
/* inflate.h -- internal inflate state definition
* Copyright (C) 1995-2004 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* WARNING: this file should *not* be used by applications. It is
part of the implementation of the compress... | |
Linux işletim sistemi çekirdeği için 'lib/zlib_inflate/inffast' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* inffast.h -- header to use inffast.c
* Copyright (C) 1995-2003 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* WARNING: this file should *not* be used by applications. It is
part of the implementation of the compression library and is
subject to change. Applic... | |
Linux kernel'inin 'lib/zlib_inflate/inflate_syms' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* linux/lib/zlib_inflate/inflate_syms.c
*
* Exported symbols for the inflate functionality.
*
*/
#include <linux/module.h>
#include <linux/init.h>
#include <linux/zlib.h>
EXPORT_SYMBOL(zlib_inflate_workspacesize);
EXPORT_SYMBOL(zlib_inflate);
EXPORT_SYMBOL(zlib_i... | |
Linux kernel'inin 'lib/zlib_inflate/infutil' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
#include <linux/zutil.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
/* Utility function: initialize zlib, unpack binary blob, clean up zlib,
* return len or negative error code.
*/
int zlib_inflate_blob(void *gunzip_buf, unsigned int sz,
const void *buf, unsigned int len... | |
Linux kernel'inin 'lib/zlib_inflate/inftrees' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
/* inftrees.c -- generate Huffman trees for efficient decoding
* Copyright (C) 1995-2005 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
#include <linux/zutil.h>
#include "inftrees.h"
#define MAXBITS 15
/*
Build a set of tables to decode the provided canonical Huffma... | |
Linux kernel'inin 'lib/zlib_inflate/inffast' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
/* inffast.c -- fast decoding
* Copyright (C) 1995-2004 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
#include <linux/zutil.h>
#include "inftrees.h"
#include "inflate.h"
#include "inffast.h"
#ifndef ASMINF
union uu {
unsigned short us;
unsigned char b[2];
};
/* End... | |
Linux işletim sistemi çekirdeği için 'lib/zlib_inflate/inffixed' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* inffixed.h -- table for decoding fixed codes
* Generated automatically by makefixed().
*/
/* WARNING: this file should *not* be used by applications. It
is part of the implementation of the compression library and
is subject to change. Applications should only use zlib.h.
*... | |
Linux kernel'inin 'lib/842/842_decompress' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* 842 Software Decompression
*
* Copyright (C) 2015 Dan Streetman, IBM Corp
*
* See 842.h for details of the 842 compressed format.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#define MODULE_NAME "842_decompress"
#include "842.h"
#include "842_debugfs.h"
... | |
Linux işletim sistemi çekirdeği için 'lib/842/842' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __842_H__
#define __842_H__
/* The 842 compressed format is made up of multiple blocks, each of
* which have the format:
*
* <template>[arg1][arg2][arg3][arg4]
*
* where there are between 0 and 4 template args, depending on the specific
* template operation. ... | |
Linux kernel'inin 'lib/842/842_compress' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* 842 Software Compression
*
* Copyright (C) 2015 Dan Streetman, IBM Corp
*
* See 842.h for details of the 842 compressed format.
*/
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#define MODULE_NAME "842_compress"
#include <linux/hashtable.h>
#include "842.h"
... | |
Linux işletim sistemi çekirdeği için 'lib/842/842_debugfs' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __842_DEBUGFS_H__
#define __842_DEBUGFS_H__
#include <linux/debugfs.h>
static bool sw842_template_counts;
module_param_named(template_counts, sw842_template_counts, bool, 0444);
static atomic_t template_count[OPS_MAX], template_repeat_count,
template_zeros_count,... | |
Linux kernel'inin 'lib/test_fortify/read_overflow2_field-memcpy' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define TEST \
memcpy(large, instance.buf, sizeof(instance.buf) + 1)
#include "test_fortify.h"
``` | |
Linux işletim sistemi çekirdeği için 'lib/test_fortify/test_fortify' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-only */
#include <linux/kernel.h>
#include <linux/printk.h>
#include <linux/slab.h>
#include <linux/string.h>
void do_fortify_tests(void);
#define __BUF_SMALL 16
#define __BUF_LARGE 32
struct fortify_object {
int a;
char buf[__BUF_SMALL];
int c;
};
#define LITERAL_SMALL "A... | |
Linux kernel'inin 'lib/test_fortify/write_overflow-memmove' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define TEST \
memmove(instance.buf, large_src, sizeof(large_src))
#include "test_fortify.h"
``` | |
Linux kernel'inin 'lib/test_fortify/read_overflow-memchr' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define TEST \
memchr(small, 0x7A, sizeof(small) + 1)
#include "test_fortify.h"
``` | |
Linux kernel'inin 'lib/test_fortify/write_overflow-memcpy' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define TEST \
memcpy(instance.buf, large_src, sizeof(large_src))
#include "test_fortify.h"
``` | |
Linux kernel'inin 'lib/test_fortify/write_overflow_field-memcpy' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define TEST \
memcpy(instance.buf, large, sizeof(instance.buf) + 1)
#include "test_fortify.h"
``` | |
Linux kernel'inin 'lib/test_fortify/read_overflow2-memcpy' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define TEST \
memcpy(large, instance.buf, sizeof(large))
#include "test_fortify.h"
``` | |
Linux kernel'inin 'lib/test_fortify/write_overflow-strcpy' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define TEST \
strcpy(small, large_src)
#include "test_fortify.h"
``` | |
Linux kernel'inin 'lib/test_fortify/read_overflow-memchr_inv' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define TEST \
memchr_inv(small, 0x7A, sizeof(small) + 1)
#include "test_fortify.h"
``` | |
Linux kernel'inin 'lib/test_fortify/read_overflow-memscan' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define TEST \
memscan(small, 0x7A, sizeof(small) + 1)
#include "test_fortify.h"
``` | |
Linux kernel'inin 'lib/test_fortify/read_overflow2_field-memmove' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define TEST \
memmove(large, instance.buf, sizeof(instance.buf) + 1)
#include "test_fortify.h"
``` | |
Linux kernel'inin 'lib/test_fortify/write_overflow-strscpy' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define TEST \
strscpy(instance.buf, large_src, sizeof(instance.buf) + 1)
#include "test_fortify.h"
``` | |
Linux kernel'inin 'lib/test_fortify/write_overflow_field-memset' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define TEST \
memset(instance.buf, 0x42, sizeof(instance.buf) + 1)
#include "test_fortify.h"
``` | |
Linux kernel'inin 'lib/test_fortify/read_overflow-memcmp' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define TEST \
memcmp(small, large, sizeof(small) + 1)
#include "test_fortify.h"
``` | |
Linux kernel'inin 'lib/test_fortify/read_overflow2-memcmp' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define TEST \
memcmp(large, small, sizeof(small) + 1)
#include "test_fortify.h"
``` | |
Linux kernel'inin 'lib/test_fortify/write_overflow-memset' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define TEST \
memset(instance.buf, 0x5A, sizeof(large_src))
#include "test_fortify.h"
``` | |
Linux kernel'inin 'lib/test_fortify/write_overflow-strcpy-lit' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define TEST \
strcpy(small, LITERAL_LARGE)
#include "test_fortify.h"
``` | |
Linux kernel'inin 'lib/test_fortify/write_overflow-strncpy' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define TEST \
strncpy(instance.buf, large_src, sizeof(instance.buf) + 1)
#include "test_fortify.h"
``` | |
Linux kernel'inin 'lib/test_fortify/read_overflow2-memmove' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define TEST \
memmove(large, instance.buf, sizeof(large))
#include "test_fortify.h"
``` | |
Linux kernel'inin 'lib/test_fortify/write_overflow-strncpy-src' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define TEST \
strncpy(small, large_src, sizeof(small) + 1)
#include "test_fortify.h"
``` | |
Linux kernel'inin 'lib/test_fortify/write_overflow_field-memmove' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#define TEST \
memmove(instance.buf, large, sizeof(instance.buf) + 1)
#include "test_fortify.h"
``` | |
Linux kernel'inin 'lib/raid/xor/xor-32regs-prefetch' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
#include <linux/prefetch.h>
#include "xor_impl.h"
static void
xor_32regs_p_2(unsigned long bytes, unsigned long * __restrict p1,
const unsigned long * __restrict p2)
{
long lines = bytes / (sizeof (long)) / 8 - 1;
prefetchw(p1);
prefetch(p2);
do {
regis... | |
Linux kernel'inin 'lib/raid/xor/xor-32regs' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
#include "xor_impl.h"
static void
xor_32regs_2(unsigned long bytes, unsigned long * __restrict p1,
const unsigned long * __restrict p2)
{
long lines = bytes / (sizeof (long)) / 8;
do {
register long d0, d1, d2, d3, d4, d5, d6, d7;
d0 = p1[0]; /* Pull the s... | |
Linux işletim sistemi çekirdeği için 'lib/raid/xor/xor_impl' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _XOR_IMPL_H
#define _XOR_IMPL_H
#include <linux/init.h>
#include <linux/minmax.h>
struct xor_block_template {
struct xor_block_template *next;
const char *name;
int speed;
void (*xor_gen)(void *dest, void **srcs, unsigned int src_cnt,
unsigned int bytes);
};
... | |
Linux kernel'inin 'lib/raid/xor/xor-8regs-prefetch' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
#include <linux/prefetch.h>
#include "xor_impl.h"
static void
xor_8regs_p_2(unsigned long bytes, unsigned long * __restrict p1,
const unsigned long * __restrict p2)
{
long lines = bytes / (sizeof (long)) / 8 - 1;
prefetchw(p1);
prefetch(p2);
do {
prefetch... | |
Linux kernel'inin 'lib/raid/xor/xor-8regs' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
#include "xor_impl.h"
static void
xor_8regs_2(unsigned long bytes, unsigned long * __restrict p1,
const unsigned long * __restrict p2)
{
long lines = bytes / (sizeof (long)) / 8;
do {
p1[0] ^= p2[0];
p1[1] ^= p2[1];
p1[2] ^= p2[2];
p1[3] ^= p2[3];
p1[... | |
Linux kernel'inin 'lib/raid/xor/xor-core' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 1996, 1997, 1998, 1999, 2000,
* Ingo Molnar, Matti Aarnio, Jakub Jelinek, Richard Henderson.
*
* Dispatch optimized XOR parity functions.
*/
#include <linux/module.h>
#include <linux/gfp.h>
#include <linux/raid/xor.h>
#include <linux/jiffies.h>
... | |
Linux kernel'inin 'lib/raid/xor/powerpc/xor_vmx_glue' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Altivec XOR operations
*
* Copyright 2017 IBM Corp.
*/
#include <linux/preempt.h>
#include <linux/sched.h>
#include <asm/switch_to.h>
#include "xor_impl.h"
#include "xor_arch.h"
#include "xor_vmx.h"
static void xor_gen_altivec(void *dest, void **srcs, unsigne... | |
Linux işletim sistemi çekirdeği için 'lib/raid/xor/powerpc/xor_vmx' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Simple interface to link xor_vmx.c and xor_vmx_glue.c
*
* Separating these file ensures that no altivec instructions are run
* outside of the enable/disable altivec block.
*/
void xor_gen_altivec_inner(void *dest, void **srcs, unsigned int src_cnt,
unsigned int b... | |
Linux kernel'inin 'lib/raid/xor/powerpc/xor_vmx' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
*
* Copyright (C) IBM Corporation, 2012
*
* Author: Anton Blanchard <anton@au.ibm.com>
*/
/*
* Sparse (as at v0.5.0) gets very, very confused by this file.
* Make it a bit simpler for it.
*/
#include "xor_impl.h"
#if !defined(__CHECKER__)
#include <altivec.h... | |
Linux işletim sistemi çekirdeği için 'lib/raid/xor/powerpc/xor_arch' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
*
* Copyright (C) IBM Corporation, 2012
*
* Author: Anton Blanchard <anton@au.ibm.com>
*/
#include <asm/cpu_has_feature.h>
extern struct xor_block_template xor_block_altivec;
static __always_inline void __init arch_xor_init(void)
{
xor_register(&xor_block_... | |
Linux kernel'inin 'lib/raid/xor/alpha/xor' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Optimized XOR parity functions for alpha EV5 and EV6
*/
#include "xor_impl.h"
#include "xor_arch.h"
extern void
xor_alpha_2(unsigned long bytes, unsigned long * __restrict p1,
const unsigned long * __restrict p2);
extern void
xor_alpha_3(unsigned long bytes... | |
Linux işletim sistemi çekirdeği için 'lib/raid/xor/alpha/xor_arch' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <asm/special_insns.h>
extern struct xor_block_template xor_block_alpha;
extern struct xor_block_template xor_block_alpha_prefetch;
/*
* Force the use of alpha_prefetch if EV6, as it is significantly faster in the
* cold cache case.
*/
static __always_i... | |
Linux kernel'inin 'lib/raid/xor/s390/xor' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Optimized xor_block operation for RAID4/5
*
* Copyright IBM Corp. 2016
* Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
*/
#include <linux/types.h>
#include "xor_impl.h"
#include "xor_arch.h"
static void xor_xc_2(unsigned long bytes, unsigned long * __restric... | |
Linux işletim sistemi çekirdeği için 'lib/raid/xor/s390/xor_arch' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Optimited xor routines
*
* Copyright IBM Corp. 2016
* Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
*/
extern struct xor_block_template xor_block_xc;
static __always_inline void __init arch_xor_init(void)
{
xor_force(&xor_block_xc);
}
``` | |
Linux kernel'inin 'lib/raid/xor/loongarch/xor_simd' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* LoongArch SIMD XOR operations
*
* Copyright (C) 2023 WANG Xuerui <git@xen0n.name>
*/
#include "xor_simd.h"
/*
* Process one cache line (64 bytes) per loop. This is assuming all future
* popular LoongArch cores are similar performance-characteristics-wise to... | |
Linux kernel'inin 'lib/raid/xor/loongarch/xor_simd_glue' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* LoongArch SIMD XOR operations
*
* Copyright (C) 2023 WANG Xuerui <git@xen0n.name>
*/
#include <linux/sched.h>
#include <asm/fpu.h>
#include "xor_impl.h"
#include "xor_arch.h"
#include "xor_simd.h"
#define MAKE_XOR_GLUES(flavor) \
DO_XOR_BLOCKS(flavor##_... | |
Linux işletim sistemi çekirdeği için 'lib/raid/xor/loongarch/xor_simd' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Simple interface to link xor_simd.c and xor_simd_glue.c
*
* Separating these files ensures that no SIMD instructions are run outside of
* the kfpu critical section.
*/
#ifndef __LOONGARCH_LIB_XOR_SIMD_H
#define __LOONGARCH_LIB_XOR_SIMD_H
#ifdef CONFIG_CPU... | |
Linux işletim sistemi çekirdeği için 'lib/raid/xor/loongarch/xor_arch' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2023 WANG Xuerui <git@xen0n.name>
*/
#include <asm/cpu-features.h>
/*
* For grins, also test the generic routines.
*
* More importantly: it cannot be ruled out at this point of time, that some
* future (maybe reduced) models could run the ve... | |
Linux kernel'inin 'lib/raid/xor/loongarch/xor_template' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2023 WANG Xuerui <git@xen0n.name>
*
* Template for XOR operations, instantiated in xor_simd.c.
*
* Expected preprocessor definitions:
*
* - LINE_WIDTH
* - XOR_FUNC_NAME(nr)
* - LD_INOUT_LINE(buf)
* - LD_AND_XOR_LINE(buf)
* - ST_LINE(buf)
*... | |
Linux kernel'inin 'lib/raid/xor/arm/xor' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2001 Russell King
*/
#include "xor_impl.h"
#include "xor_arch.h"
#define __XOR(a1, a2) a1 ^= a2
#define GET_BLOCK_2(dst) \
__asm__("ldmia %0, {%1, %2}" \
: "=r" (dst), "=r" (a1), "=r" (a2) \
: "0" (dst))
#define GET_BLOCK_4(dst) \
__asm__("ldm... | |
Linux kernel'inin 'lib/raid/xor/arm/xor-neon-glue' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2001 Russell King
*/
#include "xor_impl.h"
#include "xor_arch.h"
static void xor_gen_neon(void *dest, void **srcs, unsigned int src_cnt,
unsigned int bytes)
{
kernel_neon_begin();
xor_gen_neon_inner(dest, srcs, src_cnt, bytes);
kernel_neon_end();... | |
Linux işletim sistemi çekirdeği için 'lib/raid/xor/arm/xor_arch' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2001 Russell King
*/
#include <asm/neon.h>
extern struct xor_block_template xor_block_arm4regs;
extern struct xor_block_template xor_block_neon;
void xor_gen_neon_inner(void *dest, void **srcs, unsigned int src_cnt,
unsigned int bytes);
static ... | |
Linux kernel'inin 'lib/raid/xor/arm/xor-neon' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2013 Linaro Ltd <ard.biesheuvel@linaro.org>
*/
#include "xor_impl.h"
#include "xor_arch.h"
#ifndef __ARM_NEON__
#error You should compile this file with '-march=armv7-a -mfloat-abi=softfp -mfpu=neon'
#endif
/*
* Pull in the reference implementations... | |
Linux kernel'inin 'lib/raid/xor/tests/xor_kunit' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Unit test the XOR library functions.
*
* Copyright 2024 Google LLC
* Copyright 2026 Christoph Hellwig
*
* Based on the CRC tests by Eric Biggers <ebiggers@google.com>.
*/
#include <kunit/test.h>
#include <linux/prandom.h>
#include <linux/string_choices.h>
#i... | |
Linux işletim sistemi çekirdeği için 'lib/raid/xor/arm64/xor-neon' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-only */
void xor_gen_neon_inner(void *dest, void **srcs, unsigned int src_cnt,
unsigned int bytes);
void xor_gen_eor3_inner(void *dest, void **srcs, unsigned int src_cnt,
unsigned int bytes);
``` | |
Linux kernel'inin 'lib/raid/xor/arm64/xor-neon-glue' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Authors: Jackie Liu <liuyun01@kylinos.cn>
* Copyright (C) 2018,Tianjin KYLIN Information Technology Co., Ltd.
*/
#include <asm/simd.h>
#include "xor_impl.h"
#include "xor_arch.h"
#include "xor-neon.h"
#define XOR_TEMPLATE(_name) \
static void xor_gen_##_name(... | |
Linux işletim sistemi çekirdeği için 'lib/raid/xor/arm64/xor_arch' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Authors: Jackie Liu <liuyun01@kylinos.cn>
* Copyright (C) 2018,Tianjin KYLIN Information Technology Co., Ltd.
*/
#include <asm/simd.h>
extern struct xor_block_template xor_block_neon;
extern struct xor_block_template xor_block_eor3;
static __always_inline void ... | |
Linux kernel'inin 'lib/raid/xor/arm64/xor-neon' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Authors: Jackie Liu <liuyun01@kylinos.cn>
* Copyright (C) 2018,Tianjin KYLIN Information Technology Co., Ltd.
*/
#include <linux/cache.h>
#include <asm/neon-intrinsics.h>
#include "xor_impl.h"
#include "xor_arch.h"
#include "xor-neon.h"
static void __xor_neon_2(un... | |
Linux kernel'inde 'lib/raid/xor/sparc/xor-sparc64' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0 */
/*
* High speed xor_block operation for RAID4/5 utilizing the
* UltraSparc Visual Instruction Set and Niagara store-init/twin-load.
*
* Copyright (C) 1997, 1999 Jakub Jelinek (jj@ultra.linux.cz)
* Copyright (C) 2006 David S. Miller <davem@davemloft.net>
*/
#incl... | |
Linux kernel'inin 'lib/raid/xor/sparc/xor-sparc32' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* High speed xor_block operation for RAID4/5 utilizing the
* ldd/std SPARC instructions.
*
* Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz)
*/
#include "xor_impl.h"
#include "xor_arch.h"
static void
sparc_2(unsigned long bytes, unsigned long * __restrict ... | |
Linux işletim sistemi çekirdeği için 'lib/raid/xor/sparc/xor_arch' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 1997, 1999 Jakub Jelinek (jj@ultra.linux.cz)
* Copyright (C) 2006 David S. Miller <davem@davemloft.net>
*/
#if defined(__sparc__) && defined(__arch64__)
#include <asm/spitfire.h>
extern struct xor_block_template xor_block_VIS;
extern struct xor_block_te... | |
Linux kernel'inin 'lib/raid/xor/sparc/xor-sparc64-glue' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* High speed xor_block operation for RAID4/5 utilizing the
* UltraSparc Visual Instruction Set and Niagara block-init
* twin-load instructions.
*
* Copyright (C) 1997, 1999 Jakub Jelinek (jj@ultra.linux.cz)
* Copyright (C) 2006 David S. Miller <davem@davemloft.... | |
Linux kernel'inin 'lib/raid/xor/x86/xor-mmx' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Optimized XOR parity functions for MMX.
*
* Copyright (C) 1998 Ingo Molnar.
*/
#include <asm/fpu/api.h>
#include "xor_impl.h"
#include "xor_arch.h"
#define LD(x, y) " movq 8*("#x")(%1), %%mm"#y" ;\n"
#define ST(x, y) " movq %%mm"#y", 8*("#x")... | |
Linux kernel'inin 'lib/raid/xor/x86/xor-sse' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Optimized XOR parity functions for SSE.
*
* Cache avoiding checksumming functions utilizing KNI instructions
* Copyright (C) 1999 Zach Brown (with obvious credit due Ingo)
*
* Based on
* High-speed RAID5 checksumming functions utilizing SSE instructions.
* ... | |
Linux kernel'inin 'lib/raid/xor/x86/xor-avx' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Optimized XOR parity functions for AVX
*
* Copyright (C) 2012 Intel Corporation
* Author: Jim Kukunas <james.t.kukunas@linux.intel.com>
*
* Based on Ingo Molnar and Zach Brown's respective MMX and SSE routines
*/
#include <linux/compiler.h>
#include <asm/fpu/api... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.