arch/csky/kernel/syscall.c
Source file repositories/reference/linux-study-clean/arch/csky/kernel/syscall.c
File Facts
- System
- Linux kernel
- Corpus path
arch/csky/kernel/syscall.c- Extension
.c- Size
- 886 bytes
- Lines
- 44
- Domain
- Architecture Layer
- Bucket
- arch/csky
- Inferred role
- Architecture Layer: syscall or user/kernel boundary
- Status
- core implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or participates in a user/kernel boundary; inspect argument validation, copy_from_user/copy_to_user, credentials, and dispatch target.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/syscalls.h
Detected Declarations
syscall set_thread_areasyscall mmap2syscall csky_fadvise64_64
Annotated Snippet
SYSCALL_DEFINE1(set_thread_area, unsigned long, addr)
{
struct thread_info *ti = task_thread_info(current);
struct pt_regs *reg = current_pt_regs();
reg->tls = addr;
ti->tp_value = addr;
return 0;
}
SYSCALL_DEFINE6(mmap2,
unsigned long, addr,
unsigned long, len,
unsigned long, prot,
unsigned long, flags,
unsigned long, fd,
unsigned long, offset)
{
if (unlikely(offset & (~PAGE_MASK >> 12)))
return -EINVAL;
return ksys_mmap_pgoff(addr, len, prot, flags, fd,
offset >> (PAGE_SHIFT - 12));
}
/*
* for abiv1 the 64bits args should be even th, So we need mov the advice
* forward.
*/
SYSCALL_DEFINE4(csky_fadvise64_64,
int, fd,
int, advice,
loff_t, offset,
loff_t, len)
{
return ksys_fadvise64_64(fd, offset, len, advice);
}
Annotation
- Immediate include surface: `linux/syscalls.h`.
- Detected declarations: `syscall set_thread_area`, `syscall mmap2`, `syscall csky_fadvise64_64`.
- Atlas domain: Architecture Layer / arch/csky.
- Implementation status: core implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.