tools/include/nolibc/arch-s390.h

Source file repositories/reference/linux-study-clean/tools/include/nolibc/arch-s390.h

File Facts

System
Linux kernel
Corpus path
tools/include/nolibc/arch-s390.h
Extension
.h
Size
5381 bytes
Lines
201
Domain
Support Tooling And Documentation
Bucket
tools
Inferred role
Support Tooling And Documentation: implementation source
Status
source implementation candidate

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

struct s390_mmap_arg_struct {
	unsigned long addr;
	unsigned long len;
	unsigned long prot;
	unsigned long flags;
	unsigned long fd;
	unsigned long offset;
};

static __attribute__((unused))
void *_sys_mmap(void *addr, size_t length, int prot, int flags, int fd,
		off_t offset)
{
	struct s390_mmap_arg_struct args = {
		.addr = (unsigned long)addr,
		.len = (unsigned long)length,
		.prot = prot,
		.flags = flags,
		.fd = fd,
		.offset = (unsigned long)offset
	};

	return (void *)__nolibc_syscall1(__NR_mmap, &args);
}
#define _sys_mmap _sys_mmap

static __attribute__((unused))
pid_t _sys_fork(void)
{
	return __nolibc_syscall5(__NR_clone, 0, SIGCHLD, 0, 0, 0);
}
#define _sys_fork _sys_fork

static __attribute__((unused))
pid_t _sys_vfork(void)
{
	return __nolibc_syscall5(__NR_clone, 0, CLONE_VM | CLONE_VFORK | SIGCHLD, 0, 0, 0);
}
#define _sys_vfork _sys_vfork

#endif /* _NOLIBC_ARCH_S390_H */

Annotation

Implementation Notes