instruction stringlengths 82 202 | input stringclasses 1
value | output stringlengths 73 23.9M |
|---|---|---|
Linux kernel'inin 'rust/exports' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* A hack to export Rust symbols for loadable modules without having to redo
* the entire `include/linux/export.h` logic in Rust.
*
* This requires Rust's new/future `v0` mangling scheme because the default one
* ("legacy") uses invalid characters for C identifiers (thus ... | |
Linux işletim sistemi çekirdeği için 'rust/uapi/uapi_helper' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Header that contains the headers for which Rust UAPI bindings
* will be automatically generated by `bindgen`.
*
* Sorted alphabetically.
*/
#include <uapi/asm-generic/ioctl.h>
#include <uapi/drm/drm.h>
#include <uapi/drm/nova_drm.h>
#include <uapi/drm/panthor_drm.h... | |
Linux kernel'inde 'rust/kernel/generated_arch_reachable_asm.rs' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0 */
#include <linux/bug.h>
// Cut here.
::kernel::concat_literals!(ARCH_WARN_REACHABLE)
``` | |
Linux kernel'inde 'rust/kernel/generated_arch_static_branch_asm.rs' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0 */
#include <linux/jump_label.h>
// Cut here.
::kernel::concat_literals!(ARCH_STATIC_BRANCH_ASM("{symb} + {off} + {branch}", "{l_yes}"))
``` | |
Linux kernel'inde 'rust/kernel/generated_arch_warn_asm.rs' modülü için gerekli Low-Level Assembly kodunu yaz. | ```assembly
/* SPDX-License-Identifier: GPL-2.0 */
#include <linux/bug.h>
// Cut here.
::kernel::concat_literals!(ARCH_WARN_ASM("{file}", "{line}", "{flags}", "{size}"))
``` | |
Linux işletim sistemi çekirdeği için 'rust/bindings/bindings_helper' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Header that contains the code (mostly headers) for which Rust bindings
* will be automatically generated by `bindgen`.
*
* Sorted alphabetically.
*/
/*
* First, avoid forward references to `enum` types.
*
* This workarounds a `bindgen` issue with them:
* <https... | |
Linux kernel'inin 'rust/helpers/barrier' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <asm/barrier.h>
__rust_helper void rust_helper_smp_mb(void)
{
smp_mb();
}
__rust_helper void rust_helper_smp_wmb(void)
{
smp_wmb();
}
__rust_helper void rust_helper_smp_rmb(void)
{
smp_rmb();
}
``` | |
Linux kernel'inin 'rust/helpers/refcount' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/refcount.h>
__rust_helper refcount_t rust_helper_REFCOUNT_INIT(int n)
{
return (refcount_t)REFCOUNT_INIT(n);
}
__rust_helper void rust_helper_refcount_set(refcount_t *r, int n)
{
refcount_set(r, n);
}
__rust_helper void rust_helper_refcount_inc(refcount_t *... | |
Linux kernel'inin 'rust/helpers/drm' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <drm/drm_gem.h>
#include <drm/drm_gem_shmem_helper.h>
#include <drm/drm_vma_manager.h>
#ifdef CONFIG_DRM
__rust_helper void rust_helper_drm_gem_object_get(struct drm_gem_object *obj)
{
drm_gem_object_get(obj);
}
__rust_helper void rust_helper_drm_gem_object_put(str... | |
Linux kernel'inin 'rust/helpers/irq' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/interrupt.h>
__rust_helper int rust_helper_request_irq(unsigned int irq,
irq_handler_t handler,
unsigned long flags, const char *name,
void *dev)
{
return request_irq(irq, handler, flags, name, dev);
}
``` | |
Linux kernel'inin 'rust/helpers/vmalloc' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/vmalloc.h>
__rust_helper void *__must_check __realloc_size(2)
rust_helper_vrealloc_node_align(const void *p, size_t size, unsigned long align,
gfp_t flags, int node)
{
return vrealloc_node_align(p, size, align, flags, node);
}
``` | |
Linux kernel'inin 'rust/helpers/blk' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/blk-mq.h>
#include <linux/blkdev.h>
__rust_helper void *rust_helper_blk_mq_rq_to_pdu(struct request *rq)
{
return blk_mq_rq_to_pdu(rq);
}
__rust_helper struct request *rust_helper_blk_mq_rq_from_pdu(void *pdu)
{
return blk_mq_rq_from_pdu(pdu);
}
``` | |
Linux kernel'inin 'rust/helpers/mm' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/mm.h>
#include <linux/sched/mm.h>
__rust_helper void rust_helper_mmgrab(struct mm_struct *mm)
{
mmgrab(mm);
}
__rust_helper void rust_helper_mmdrop(struct mm_struct *mm)
{
mmdrop(mm);
}
__rust_helper void rust_helper_mmget(struct mm_struct *mm)
{
mmget(mm)... | |
Linux kernel'inin 'rust/helpers/atomic' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
// Generated by scripts/atomic/gen-rust-atomic-helpers.sh
// DO NOT MODIFY THIS FILE DIRECTLY
/*
* This file provides helpers for the various atomic functions for Rust.
*/
#ifndef _RUST_ATOMIC_API_H
#define _RUST_ATOMIC_API_H
#include <linux/atomic.h>
__rust_helper int
rus... | |
Linux kernel'inin 'rust/helpers/rcu' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/rcupdate.h>
__rust_helper void rust_helper_rcu_read_lock(void)
{
rcu_read_lock();
}
__rust_helper void rust_helper_rcu_read_unlock(void)
{
rcu_read_unlock();
}
``` | |
Linux kernel'inin 'rust/helpers/of' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/of.h>
__rust_helper bool rust_helper_is_of_node(const struct fwnode_handle *fwnode)
{
return is_of_node(fwnode);
}
``` | |
Linux kernel'inin 'rust/helpers/helpers' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Non-trivial C macros cannot be used in Rust. Similarly, inlined C functions
* cannot be called either. This file explicitly creates functions ("helpers")
* that wrap those so that they can be called from Rust.
*
* Sorted alphabetically.
*/
#include <linux/compiler_ty... | |
Linux kernel'inin 'rust/helpers/build_bug' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/errname.h>
__rust_helper const char *rust_helper_errname(int err)
{
return errname(err);
}
``` | |
Linux kernel'inin 'rust/helpers/cred' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/cred.h>
__rust_helper const struct cred *rust_helper_get_cred(const struct cred *cred)
{
return get_cred(cred);
}
__rust_helper void rust_helper_put_cred(const struct cred *cred)
{
put_cred(cred);
}
``` | |
Linux kernel'inin 'rust/helpers/maple_tree' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/maple_tree.h>
__rust_helper void rust_helper_mt_init_flags(struct maple_tree *mt,
unsigned int flags)
{
mt_init_flags(mt, flags);
}
``` | |
Linux kernel'inin 'rust/helpers/processor' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/processor.h>
__rust_helper void rust_helper_cpu_relax(void)
{
cpu_relax();
}
``` | |
Linux kernel'inin 'rust/helpers/binder' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2025 Google LLC.
*/
#include <linux/list_lru.h>
#include <linux/task_work.h>
__rust_helper unsigned long rust_helper_list_lru_count(struct list_lru *lru)
{
return list_lru_count(lru);
}
__rust_helper unsigned long rust_helper_list_lru_walk(struct list_l... | |
Linux kernel'inin 'rust/helpers/bug' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/bug.h>
__rust_helper __noreturn void rust_helper_BUG(void)
{
BUG();
}
__rust_helper bool rust_helper_WARN_ON(bool cond)
{
return WARN_ON(cond);
}
``` | |
Linux kernel'inin 'rust/helpers/gpu' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/gpu_buddy.h>
#ifdef CONFIG_GPU_BUDDY
__rust_helper u64 rust_helper_gpu_buddy_block_offset(const struct gpu_buddy_block *block)
{
return gpu_buddy_block_offset(block);
}
__rust_helper unsigned int rust_helper_gpu_buddy_block_order(struct gpu_buddy_block *bloc... | |
Linux kernel'inin 'rust/helpers/auxiliary' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/auxiliary_bus.h>
__rust_helper void
rust_helper_auxiliary_device_uninit(struct auxiliary_device *adev)
{
return auxiliary_device_uninit(adev);
}
__rust_helper void
rust_helper_auxiliary_device_delete(struct auxiliary_device *adev)
{
return auxiliary_device_d... | |
Linux kernel'inin 'rust/helpers/bitmap' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/bitmap.h>
__rust_helper
void rust_helper_bitmap_copy_and_extend(unsigned long *to, const unsigned long *from,
unsigned int count, unsigned int size)
{
bitmap_copy_and_extend(to, from, count, size);
}
``` | |
Linux kernel'inin 'rust/helpers/spinlock' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/spinlock.h>
__rust_helper void rust_helper___spin_lock_init(spinlock_t *lock,
const char *name,
struct lock_class_key *key)
{
#ifdef CONFIG_DEBUG_SPINLOCK
# if defined(CONFIG_PREEMPT_RT)
__spin_lock_init(lock, name, key, false);
# else /*!CONFIG_PR... | |
Linux kernel'inin 'rust/helpers/atomic_ext' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <asm/barrier.h>
#include <asm/rwonce.h>
#include <linux/atomic.h>
#define GEN_READ_HELPER(tname, type) \
__rust_helper type rust_helper_atomic_##tname##_read(type *ptr) \
{ \
return READ_ONCE(*ptr); \
}
#define GEN_SET_HELPER(tname, type) ... | |
Linux kernel'inin 'rust/helpers/device' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/device.h>
__rust_helper int rust_helper_devm_add_action(struct device *dev,
void (*action)(void *),
void *data)
{
return devm_add_action(dev, action, data);
}
__rust_helper int rust_helper_devm_add_action_or_reset(struct device *dev,
... | |
Linux kernel'inin 'rust/helpers/poll' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/export.h>
#include <linux/poll.h>
__rust_helper void rust_helper_poll_wait(struct file *filp,
wait_queue_head_t *wait_address,
poll_table *p)
{
poll_wait(filp, wait_address, p);
}
``` | |
Linux kernel'inin 'rust/helpers/page' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/gfp.h>
#include <linux/highmem.h>
#include <linux/mm.h>
__rust_helper struct page *rust_helper_alloc_pages(gfp_t gfp_mask,
unsigned int order)
{
return alloc_pages(gfp_mask, order);
}
__rust_helper void *rust_helper_kmap_local_page(struct page *page)... | |
Linux kernel'inin 'rust/helpers/clk' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/clk.h>
/*
* The "inline" implementation of below helpers are only available when
* CONFIG_HAVE_CLK or CONFIG_HAVE_CLK_PREPARE aren't set.
*/
#ifndef CONFIG_HAVE_CLK
__rust_helper struct clk *rust_helper_clk_get(struct device *dev,
const char *id)
... | |
Linux kernel'inin 'rust/helpers/sync' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/lockdep.h>
__rust_helper void rust_helper_lockdep_register_key(struct lock_class_key *k)
{
lockdep_register_key(k);
}
__rust_helper void rust_helper_lockdep_unregister_key(struct lock_class_key *k)
{
lockdep_unregister_key(k);
}
``` | |
Linux kernel'inin 'rust/helpers/time' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/delay.h>
#include <linux/ktime.h>
#include <linux/timekeeping.h>
__rust_helper void rust_helper_fsleep(unsigned long usecs)
{
fsleep(usecs);
}
__rust_helper ktime_t rust_helper_ktime_get_real(void)
{
return ktime_get_real();
}
__rust_helper ktime_t rust_hel... | |
Linux kernel'inin 'rust/helpers/signal' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/sched/signal.h>
__rust_helper int rust_helper_signal_pending(struct task_struct *t)
{
return signal_pending(t);
}
``` | |
Linux kernel'inin 'rust/helpers/slab' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/slab.h>
__rust_helper void *__must_check __realloc_size(2)
rust_helper_krealloc_node_align(const void *objp, size_t new_size, unsigned long align,
gfp_t flags, int node)
{
return krealloc_node_align(objp, new_size, align, flags, node);
}
__rust_helper voi... | |
Linux kernel'inin 'rust/helpers/regulator' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/regulator/consumer.h>
#ifndef CONFIG_REGULATOR
__rust_helper void rust_helper_regulator_put(struct regulator *regulator)
{
regulator_put(regulator);
}
__rust_helper int rust_helper_regulator_set_voltage(struct regulator *regulator,
int min_uV, int ... | |
Linux kernel'inin 'rust/helpers/cpu' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/smp.h>
__rust_helper unsigned int rust_helper_raw_smp_processor_id(void)
{
return raw_smp_processor_id();
}
``` | |
Linux kernel'inin 'rust/helpers/scatterlist' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/dma-direction.h>
__rust_helper dma_addr_t rust_helper_sg_dma_address(struct scatterlist *sg)
{
return sg_dma_address(sg);
}
__rust_helper unsigned int rust_helper_sg_dma_len(struct scatterlist *sg)
{
return sg_dma_len(sg);
}
__rust_helper struct scatterlist... | |
Linux kernel'inin 'rust/helpers/kunit' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <kunit/test-bug.h>
__rust_helper struct kunit *rust_helper_kunit_get_current_test(void)
{
return kunit_get_current_test();
}
``` | |
Linux kernel'inin 'rust/helpers/task' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/kernel.h>
#include <linux/sched/task.h>
__rust_helper void rust_helper_might_resched(void)
{
might_resched();
}
__rust_helper struct task_struct *rust_helper_get_current(void)
{
return current;
}
__rust_helper void rust_helper_get_task_struct(struct task_st... | |
Linux kernel'inin 'rust/helpers/pid_namespace' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/pid_namespace.h>
#include <linux/cleanup.h>
__rust_helper struct pid_namespace *
rust_helper_get_pid_ns(struct pid_namespace *ns)
{
return get_pid_ns(ns);
}
__rust_helper void rust_helper_put_pid_ns(struct pid_namespace *ns)
{
put_pid_ns(ns);
}
/* Get a ref... | |
Linux kernel'inin 'rust/helpers/bitops' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/bitops.h>
#include <linux/find.h>
__rust_helper
void rust_helper___set_bit(unsigned long nr, unsigned long *addr)
{
__set_bit(nr, addr);
}
__rust_helper
void rust_helper___clear_bit(unsigned long nr, unsigned long *addr)
{
__clear_bit(nr, addr);
}
__rust_he... | |
Linux kernel'inin 'rust/helpers/security' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/security.h>
#ifndef CONFIG_SECURITY
__rust_helper void rust_helper_security_cred_getsecid(const struct cred *c,
u32 *secid)
{
security_cred_getsecid(c, secid);
}
__rust_helper int rust_helper_security_secid_to_secctx(u32 secid,
struct... | |
Linux kernel'inin 'rust/helpers/build_assert' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/build_bug.h>
/*
* `bindgen` binds the C `size_t` type as the Rust `usize` type, so we can
* use it in contexts where Rust expects a `usize` like slice (array) indices.
* `usize` is defined to be the same as C's `uintptr_t` type (can hold any
* pointer) but ... | |
Linux kernel'inin 'rust/helpers/fs' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2024 Google LLC.
*/
#include <linux/fs.h>
__rust_helper struct file *rust_helper_get_file(struct file *f)
{
return get_file(f);
}
``` | |
Linux kernel'inin 'rust/helpers/mutex' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/mutex.h>
__rust_helper void rust_helper_mutex_lock(struct mutex *lock)
{
mutex_lock(lock);
}
__rust_helper int rust_helper_mutex_trylock(struct mutex *lock)
{
return mutex_trylock(lock);
}
__rust_helper void rust_helper___mutex_init(struct mutex *mutex,
... | |
Linux kernel'inin 'rust/helpers/dma-resv' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/dma-resv.h>
__rust_helper
int rust_helper_dma_resv_lock(struct dma_resv *obj, struct ww_acquire_ctx *ctx)
{
return dma_resv_lock(obj, ctx);
}
__rust_helper void rust_helper_dma_resv_unlock(struct dma_resv *obj)
{
dma_resv_unlock(obj);
}
``` | |
Linux kernel'inin 'rust/helpers/pci' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/pci.h>
__rust_helper u16 rust_helper_pci_dev_id(struct pci_dev *dev)
{
return PCI_DEVID(dev->bus->number, dev->devfn);
}
__rust_helper resource_size_t
rust_helper_pci_resource_start(struct pci_dev *pdev, int bar)
{
return pci_resource_start(pdev, bar);
}
__... | |
Linux kernel'inin 'rust/helpers/rbtree' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/rbtree.h>
__rust_helper void rust_helper_rb_link_node(struct rb_node *node,
struct rb_node *parent,
struct rb_node **rb_link)
{
rb_link_node(node, parent, rb_link);
}
__rust_helper struct rb_node *rust_helper_rb_first(const struct rb_root *r... | |
Linux kernel'inin 'rust/helpers/dma' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/dma-mapping.h>
__rust_helper void *rust_helper_dma_alloc_attrs(struct device *dev, size_t size,
dma_addr_t *dma_handle,
gfp_t flag, unsigned long attrs)
{
return dma_alloc_attrs(dev, size, dma_handle, flag, attrs);
}
__rust_helper void rust_helper... | |
Linux kernel'inin 'rust/helpers/xarray' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/xarray.h>
__rust_helper int rust_helper_xa_err(void *entry)
{
return xa_err(entry);
}
__rust_helper void rust_helper_xa_init_flags(struct xarray *xa, gfp_t flags)
{
return xa_init_flags(xa, flags);
}
__rust_helper int rust_helper_xa_trylock(struct xarray *x... | |
Linux kernel'inin 'rust/helpers/workqueue' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/workqueue.h>
__rust_helper void rust_helper_init_work_with_key(struct work_struct *work,
work_func_t func,
bool onstack,
const char *name,
struct lock_class_key *key)
{
__init_work(work, onstack);
work->data = (atomic_long_t)WO... | |
Linux kernel'inin 'rust/helpers/cpumask' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/cpumask.h>
__rust_helper
void rust_helper_cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
{
cpumask_set_cpu(cpu, dstp);
}
__rust_helper
void rust_helper___cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
{
__cpumask_set_cpu(cpu, dstp);
}
__ru... | |
Linux kernel'inin 'rust/helpers/completion' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/completion.h>
__rust_helper void rust_helper_init_completion(struct completion *x)
{
init_completion(x);
}
``` | |
Linux kernel'inin 'rust/helpers/pwm' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
// Copyright (c) 2025 Samsung Electronics Co., Ltd.
// Author: Michal Wilczynski <m.wilczynski@samsung.com>
#include <linux/pwm.h>
__rust_helper struct device *rust_helper_pwmchip_parent(const struct pwm_chip *chip)
{
return pwmchip_parent(chip);
}
__rust_helper void *rust_h... | |
Linux kernel'inin 'rust/helpers/err' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/err.h>
__rust_helper __force void *rust_helper_ERR_PTR(long err)
{
return ERR_PTR(err);
}
__rust_helper bool rust_helper_IS_ERR(__force const void *ptr)
{
return IS_ERR(ptr);
}
__rust_helper long rust_helper_PTR_ERR(__force const void *ptr)
{
return PTR_ER... | |
Linux kernel'inin 'rust/helpers/io' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/io.h>
#include <linux/ioport.h>
__rust_helper void __iomem *rust_helper_ioremap(phys_addr_t offset, size_t size)
{
return ioremap(offset, size);
}
__rust_helper void __iomem *rust_helper_ioremap_np(phys_addr_t offset,
size_t size)
{
return ioremap_n... | |
Linux kernel'inin 'rust/helpers/platform' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/platform_device.h>
__rust_helper bool rust_helper_dev_is_platform(const struct device *dev)
{
return dev_is_platform(dev);
}
``` | |
Linux kernel'inin 'rust/helpers/list' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Helpers for C circular doubly linked list implementation.
*/
#include <linux/list.h>
__rust_helper void rust_helper_INIT_LIST_HEAD(struct list_head *list)
{
INIT_LIST_HEAD(list);
}
__rust_helper void rust_helper_list_add_tail(struct list_head *new, struct list_head *... | |
Linux kernel'inin 'rust/helpers/uaccess' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/uaccess.h>
__rust_helper unsigned long
rust_helper_copy_from_user(void *to, const void __user *from, unsigned long n)
{
return copy_from_user(to, from, n);
}
__rust_helper unsigned long
rust_helper_copy_to_user(void __user *to, const void *from, unsigned long... | |
Linux kernel'inin 'rust/helpers/wait' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/wait.h>
__rust_helper void rust_helper_init_wait(struct wait_queue_entry *wq_entry)
{
init_wait(wq_entry);
}
``` | |
Linux kernel'inin 'rust/helpers/property' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/property.h>
__rust_helper void rust_helper_fwnode_handle_put(struct fwnode_handle *fwnode)
{
fwnode_handle_put(fwnode);
}
``` | |
Linux kernel'inin 'rust/helpers/cpufreq' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/cpufreq.h>
#ifdef CONFIG_CPU_FREQ
__rust_helper void
rust_helper_cpufreq_register_em_with_opp(struct cpufreq_policy *policy)
{
cpufreq_register_em_with_opp(policy);
}
#endif
``` | |
Linux kernel'inin 'rust/helpers/usb' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/usb.h>
__rust_helper struct usb_device *
rust_helper_interface_to_usbdev(struct usb_interface *intf)
{
return interface_to_usbdev(intf);
}
``` | |
Linux kernel'inin 'rust/helpers/jump_label' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2024 Google LLC.
*/
#include <linux/jump_label.h>
#ifndef CONFIG_JUMP_LABEL
__rust_helper int rust_helper_static_key_count(struct static_key *key)
{
return static_key_count(key);
}
#endif
``` | |
Linux kernel'inin 'init/initramfs_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <kunit/test.h>
#include <linux/fcntl.h>
#include <linux/file.h>
#include <linux/fs.h>
#include <linux/init_syscalls.h>
#include <linux/stringify.h>
#include <linux/timekeeping.h>
#include "initramfs_internal.h"
struct initramfs_test_cpio {
char *magic;
unsigned int i... | |
Linux kernel'inin 'init/version' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* linux/init/version.c
*
* Copyright (C) 1992 Theodore Ts'o
*
* May be freely distributed as part of Linux.
*/
#include <generated/compile.h>
#include <linux/build-salt.h>
#include <linux/elfnote-lto.h>
#include <linux/export.h>
#include <linux/init.h>
#includ... | |
Linux kernel'inin 'init/version-timestamp' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include <generated/compile.h>
#include <generated/utsrelease.h>
#include <linux/proc_ns.h>
#include <linux/refcount.h>
#include <linux/uts.h>
#include <linux/utsname.h>
struct uts_namespace init_uts_ns = {
.ns = NS_COMMON_INIT(init_uts_ns),
.name = {
.sysname = UTS_S... | |
Linux kernel'inin 'init/main' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* linux/init/main.c
*
* Copyright (C) 1991, 1992 Linus Torvalds
*
* GK 2/5/95 - Changed to support mounting root fs via NFS
* Added initrd & change_root: Werner Almesberger & Hans Lermen, Feb '96
* Moan early if gcc is old, avoiding bogus kernels - Paul Go... | |
Linux kernel'inin 'init/do_mounts_initrd' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/unistd.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/initrd.h>
#include "do_mounts.h"
unsigned long initrd_start, initrd_end;
int initrd_below_start_ok;
static int __initdata mount_initrd = 1;
phys_addr_t phys_initrd_start __initdata;
unsi... | |
Linux kernel'inin 'init/initramfs' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/init.h>
#include <linux/async.h>
#include <linux/export.h>
#include <linux/fs.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/fcntl.h>
#include <linux/delay.h>
#include <linux/string.h>
#include <linux/dirent.h>
#include <linux/syscalls.h>
#in... | |
Linux kernel'inin 'init/do_mounts' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/ctype.h>
#include <linux/fd.h>
#include <linux/tty.h>
#include <linux/suspend.h>
#include <linux/root_dev.h>
#include <linux/security.h>
#include <linux/delay.h>
#include <linux/mount.h>
#include <linux/devi... | |
Linux işletim sistemi çekirdeği için 'init/do_mounts' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#include <linux/kernel.h>
#include <linux/blkdev.h>
#include <linux/init.h>
#include <linux/syscalls.h>
#include <linux/unistd.h>
#include <linux/slab.h>
#include <linux/mount.h>
#include <linux/major.h>
#include <linux/root_dev.h>
#include <linux/init_syscalls.h>
#include <l... | |
Linux kernel'inin 'init/calibrate' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/* calibrate.c: default delay calibration
*
* Excised from init/main.c
* Copyright (C) 1991, 1992 Linus Torvalds
*/
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/jiffies.h>
#include <linux/kstrtox.h>
#include <linux/percpu.h>
#include <linux/printk.h>
#... | |
Linux işletim sistemi çekirdeği için 'init/initramfs_internal' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
// SPDX-License-Identifier: GPL-2.0
#ifndef __INITRAMFS_INTERNAL_H__
#define __INITRAMFS_INTERNAL_H__
char *unpack_to_rootfs(char *buf, unsigned long len);
#define CPIO_HDRLEN 110
#endif
``` | |
Linux kernel'inin 'init/init_task' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/init_task.h>
#include <linux/export.h>
#include <linux/mqueue.h>
#include <linux/sched.h>
#include <linux/sched/sysctl.h>
#include <linux/sched/rt.h>
#include <linux/sched/task.h>
#include <linux/sched/ext.h>
#include <linux/init.h>
#include <linux/fs.h>
#include... | |
Linux kernel'inin 'init/do_mounts_rd' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/minix_fs.h>
#include <linux/ext2_fs.h>
#include <linux/romfs_fs.h>
#include <uapi/linux/cramfs_fs.h>
#include <linux/initrd.h>
#include <linux/string.h>
#include <linux/string_choices.h>
#include <linux/slab.h>
#in... | |
Linux kernel'inin 'init/noinitramfs' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* init/noinitramfs.c
*
* Copyright (C) 2006, NXP Semiconductors, All Rights Reserved
* Author: Jean-Paul Saman <jean-paul.saman@nxp.com>
*/
#include <linux/init.h>
#include <linux/stat.h>
#include <linux/kdev_t.h>
#include <linux/syscalls.h>
#include <linux/init_sys... | |
Linux kernel'inin 'kernel/stacktrace' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* kernel/stacktrace.c
*
* Stack trace management functions
*
* Copyright (C) 2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com>
*/
#include <linux/sched/task_stack.h>
#include <linux/sched/debug.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux... | |
Linux kernel'inin 'kernel/tsacct' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* tsacct.c - System accounting over taskstats interface
*
* Copyright (C) Jay Lan, <jlan@sgi.com>
*/
#include <linux/kernel.h>
#include <linux/sched/signal.h>
#include <linux/sched/mm.h>
#include <linux/sched/cputime.h>
#include <linux/tsacct_kern.h>
#include <l... | |
Linux kernel'inin 'kernel/torture' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0+
/*
* Common functions for in-kernel torture tests.
*
* Copyright (C) IBM Corporation, 2014
*
* Author: Paul E. McKenney <paulmck@linux.ibm.com>
* Based on kernel/rcu/torture.c.
*/
#define pr_fmt(fmt) fmt
#include <linux/types.h>
#include <linux/kernel.h>
#include <linu... | |
Linux kernel'inin 'kernel/vmcore_info' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* crash.c - kernel crash support code.
* Copyright (C) 2002-2004 Eric Biederman <ebiederm@xmission.com>
*/
#include <linux/buildid.h>
#include <linux/init.h>
#include <linux/utsname.h>
#include <linux/vmalloc.h>
#include <linux/sizes.h>
#include <linux/kexec.h>
#inc... | |
Linux kernel'inin 'kernel/hung_task' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Detect Hung Task
*
* kernel/hung_task.c - kernel thread for detecting tasks stuck in D state
*
*/
#include <linux/mm.h>
#include <linux/cpu.h>
#include <linux/nmi.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/freezer.h>
#include <linux/kthre... | |
Linux kernel'inin 'kernel/pid' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Generic pidhash and scalable, time-bounded PID allocator
*
* (C) 2002-2003 Nadia Yvette Chambers, IBM
* (C) 2004 Nadia Yvette Chambers, Oracle
* (C) 2002-2004 Ingo Molnar, Red Hat
*
* pid-structures are backing objects for tasks sharing a given ID to chain
* ag... | |
Linux kernel'inin 'kernel/notifier' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include <linux/kdebug.h>
#include <linux/kprobes.h>
#include <linux/export.h>
#include <linux/notifier.h>
#include <linux/rcupdate.h>
#include <linux/vmalloc.h>
#define CREATE_TRACE_POINTS
#include <trace/events/notifier.h>
/*
* Notifier chain core routines. The export... | |
Linux kernel'inin 'kernel/audit_tree' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include "audit.h"
#include <linux/fsnotify_backend.h>
#include <linux/namei.h>
#include <linux/mount.h>
#include <linux/kthread.h>
#include <linux/refcount.h>
#include <linux/slab.h>
struct audit_tree;
struct audit_chunk;
struct audit_tree {
refcount_t count;
int goner;
st... | |
Linux kernel'inin 'kernel/utsname_sysctl' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2007
*
* Author: Eric Biederman <ebiederm@xmision.com>
*/
#include <linux/export.h>
#include <linux/uts.h>
#include <linux/utsname.h>
#include <linux/random.h>
#include <linux/sysctl.h>
#include <linux/wait.h>
#include <linux/rwsem.h>
#ifdef CONFI... | |
Linux kernel'inin 'kernel/groups' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Supplementary group IDs
*/
#include <linux/cred.h>
#include <linux/export.h>
#include <linux/slab.h>
#include <linux/security.h>
#include <linux/sort.h>
#include <linux/syscalls.h>
#include <linux/user_namespace.h>
#include <linux/vmalloc.h>
#include <linux/uaccess.h>
st... | |
Linux kernel'inin 'kernel/padata' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* padata.c - generic interface to process data streams in parallel
*
* See Documentation/core-api/padata.rst for more information.
*
* Copyright (C) 2008, 2009 secunet Security Networks AG
* Copyright (C) 2008, 2009 Steffen Klassert <steffen.klassert@secunet.com>
*
* ... | |
Linux işletim sistemi çekirdeği için 'kernel/kexec_internal' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef LINUX_KEXEC_INTERNAL_H
#define LINUX_KEXEC_INTERNAL_H
#include <linux/kexec.h>
struct kexec_segment;
struct kimage *do_kimage_alloc_init(void);
int sanity_check_segment_list(struct kimage *image);
void kimage_free_page_list(struct list_head *list);
void kimage_free... | |
Linux kernel'inin 'kernel/reboot' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* linux/kernel/reboot.c
*
* Copyright (C) 2013 Linus Torvalds
*/
#define pr_fmt(fmt) "reboot: " fmt
#include <linux/atomic.h>
#include <linux/ctype.h>
#include <linux/export.h>
#include <linux/kexec.h>
#include <linux/kmod.h>
#include <linux/kmsg_dump.h>
#includ... | |
Linux kernel'inin 'kernel/sys_ni' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
#include <linux/linkage.h>
#include <linux/errno.h>
#include <asm/unistd.h>
#ifdef CONFIG_ARCH_HAS_SYSCALL_WRAPPER
/* Architectures may override COND_SYSCALL and COND_SYSCALL_COMPAT */
#include <asm/syscall_wrapper.h>
#endif /* CONFIG_ARCH_HAS_SYSCALL_WRAPPER */
/* we can't... | |
Linux işletim sistemi çekirdeği için 'kernel/workqueue_internal' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0 */
/*
* kernel/workqueue_internal.h
*
* Workqueue internal header file. Only to be included by workqueue and
* core kernel subsystems.
*/
#ifndef _KERNEL_WORKQUEUE_INTERNAL_H
#define _KERNEL_WORKQUEUE_INTERNAL_H
#include <linux/workqueue.h>
#include <linux/kthread.h>
#inc... | |
Linux kernel'inin 'kernel/vhost_task' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2021 Oracle Corporation
*/
#include <linux/slab.h>
#include <linux/completion.h>
#include <linux/sched/task.h>
#include <linux/sched/vhost_task.h>
#include <linux/sched/signal.h>
enum vhost_task_flags {
VHOST_TASK_FLAGS_STOP,
VHOST_TASK_FLAGS_KILLED,... | |
Linux kernel'inin 'kernel/crash_core_test' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-only
#include <kunit/test.h>
#include <linux/crash_core.h> // For struct crash_mem and struct range if defined there
// Helper to create and initialize crash_mem
static struct crash_mem *create_crash_mem(struct kunit *test, unsigned int max_ranges,
unsigned int nr_initia... | |
Linux kernel'inin 'kernel/cfi' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Clang Control Flow Integrity (CFI) error handling.
*
* Copyright (C) 2022 Google LLC
*/
#include <linux/bpf.h>
#include <linux/cfi_types.h>
#include <linux/cfi.h>
bool cfi_warn __ro_after_init = IS_ENABLED(CONFIG_CFI_PERMISSIVE);
enum bug_trap_type report_cfi_failure... | |
Linux işletim sistemi çekirdeği için 'kernel/kallsyms_selftest' yapılarının ve prototiplerinin bulunduğu C Header dosyasını yaz. | ```c
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef LINUX_KALLSYMS_SELFTEST_H_
#define LINUX_KALLSYMS_SELFTEST_H_
#include <linux/types.h>
extern int kallsyms_test_var_bss;
extern int kallsyms_test_var_data;
extern int kallsyms_test_func(void);
extern int kallsyms_test_func_weak(void);
#endif // LINUX_KALL... | |
Linux kernel'inin 'kernel/audit' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0-or-later
/* audit.c -- Auditing support
* Gateway between the kernel (e.g., selinux) and the user-space audit daemon.
* System-call specific features have moved to auditsc.c
*
* Copyright 2003-2007 Red Hat Inc., Durham, North Carolina.
* All Rights Reserved.
*
* Written b... | |
Linux kernel'inin 'kernel/uid16' alt sistemi için gerekli C kaynak kodunu implemente et. | ```c
// SPDX-License-Identifier: GPL-2.0
/*
* Wrapper functions for 16bit uid back compatibility. All nicely tied
* together in the faint hope we can take the out in five years time.
*/
#include <linux/mm.h>
#include <linux/mman.h>
#include <linux/notifier.h>
#include <linux/reboot.h>
#include <linux/prctl.h>
#incl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.