Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

syscall(2) [bsd man page]

SYSCALL(2)							System Calls Manual							SYSCALL(2)

NAME
syscall - indirect system call SYNOPSIS
#include <syscall.h> syscall(number, arg, ...) (VAX-11) DESCRIPTION
Syscall performs the system call whose assembly language interface has the specified number, register arguments r0 and r1 and further argu- ments arg. Symbolic constants for system calls can be found in the header file <syscall.h>. The r0 value of the system call is returned. DIAGNOSTICS
When the C-bit is set, syscall returns -1 and sets the external variable errno (see intro(2)). BUGS
There is no way to simulate system calls such as pipe(2), which return values in register r1. 4th Berkeley Distribution April 16, 1986 SYSCALL(2)

Check Out this Related Man Page

syscall(3UCB)					     SunOS/BSD Compatibility Library Functions					     syscall(3UCB)

NAME
syscall - indirect system call SYNOPSIS
/usr/ucb/cc [ flag ... ] file ... #include <sys/syscall.h> int syscall(number, arg, ...); DESCRIPTION
syscall() performs the function whose assembly language interface has the specified number, and arguments arg .... Symbolic constants for functions can be found in the header <sys/syscall.h>. RETURN VALUES
On error syscall() returns -1 and sets the external variable errno (see intro(2)). FILES
<sys/syscall.h> SEE ALSO
intro(2), pipe(2) NOTES
Use of these interfaces should be restricted to only applications written on BSD platforms. Use of these interfaces with any of the system libraries or in multi-thread applications is unsupported. WARNINGS
There is no way to use syscall() to call functions such as pipe(2) which return values that do not fit into one hardware register. Since many system calls are implemented as library wrappers around traps to the kernel, these calls may not behave as documented when called from syscall(), which bypasses these wrappers. For these reasons, using syscall() is not recommended. SunOS 5.10 22 Jan 1993 syscall(3UCB)
Man Page

13 More Discussions You Might Find Interesting

1. Programming

recv syscall for socket programming

I have a question regarding the recv syscall. Suppose I have a client/server and the following exchange of message took place: Client --> Server using multiple send syscalls one after another immediately: send "Packet1" send "Packet2" send "Packet3" Server receives in the... (2 Replies)
Discussion started by: heljy
2 Replies

2. Programming

behaviour of read() and write() after a select()

Hello, I have problems finding clear information about the use of select(). I want to write an application, and for that I need to be sure about the functions behaviour. So to ensure, that I understood it all correctly I make some statements or questions. So a qualified answer could just be: yes,... (13 Replies)
Discussion started by: calv
13 Replies

3. Programming

Fork syscall and related issues

Hi all, i just started started learning system programming and want to pursue a career in the sys prog area. below is the program that use a fork() call. i read in one of the tutorials that parent process and child process uses different address spaces and runs concurrently. that meas each... (2 Replies)
Discussion started by: MrUser
2 Replies

4. UNIX for Advanced & Expert Users

how to distinguish entry/exit of a syscall when using ptrace?

Hi all, I am using ptrace to keep track of clone syscalls in a program. However, I found that the traced syscall cant be paired. for example, there are some syscalls that have entry, but without exit showing up in the traced sequences. So, is there anyway to distinguish the entry and exit of a... (0 Replies)
Discussion started by: tristartom
0 Replies

5. Programming

C Sleep function hangs @ __kernel_vsyscall ()

This is the gdb backtrace. ^C Program received signal SIGINT, Interrupt. 0xffffe424 in __kernel_vsyscall () (gdb) bt #0 0xffffe424 in __kernel_vsyscall () #1 0xb7e56a70 in __nanosleep_nocancel () from /lib/libc.so.6 #2 0xb7e568bb in __sleep (seconds=0) at sleep.c:138 #3 0x080496d5 in... (6 Replies)
Discussion started by: dragonpoint
6 Replies

6. Programming

__kernel_vsyscall ()

I'm trying to compile a program called varkon, but after I chose an option from the main screen it gives me a segfault. The code is to long for me to go through it all, so I tried using gdb. This was the output: Reading symbols from /home/oliverj/Downloads/varkon/bin/xvarkon...(no debugging... (5 Replies)
Discussion started by: weirdo77
5 Replies

7. UNIX for Dummies Questions & Answers

is read() syscall really a primitive?

I saw somewhere that describe read() as a primitive. But when I lean signals, it says the read() may be interrupted by a signal. My Question: 1, What is the diffence between primitive and reentrant? 2, Is read() a primitive or reentrant? 3, Are all system calls primitive or reentrant? (2 Replies)
Discussion started by: vistastar
2 Replies

8. Red Hat

core dump analysis : __kernel_vsyscall ()

We have just enabled core dump on our RHEL5.7 OS. the java process is terminating very often so we enable core dump to analysis the issue and find below in core dump file. Core was generated by `/usr/java/jdk1.6.0_06//bin/java -server -Xms1536m -Xmx1536m -Xmn576m -XX:+Aggre'. Program... (0 Replies)
Discussion started by: pawankkamboj
0 Replies

9. UNIX for Advanced & Expert Users

Process on CPU inside syscall

Hello Experts, If a Solaris process is calling some syscall, and right now execution is inside syscall doing only CPU work, for example the inside simplest times syscall, -> app_func => times << we are here now, we have entered in the times, but not exited yet <= times <- app_func... (9 Replies)
Discussion started by: sant
9 Replies

10. Red Hat

Adding our system call Fedora 18 -new syscall

Hi, I wanna add my own system call to Fedora 18 kernel 3.8.2. From kernel 3.3 I heard there is a new system to add system calls. So where i can find a guides ? I wanna print this text: "Hello world!" in terminal, not dmesg. (4 Replies)
Discussion started by: googz
4 Replies

11. Programming

Download file with socket syscall

Hello to all I want download a file in osx intel 64 with NASM , I want to use socket syscall This is part of my code section .data command db "GET /test/2.gif HTTP/1.1\r\nHost: 10.1.1.187\r\n\r\n", 0 ; url db "http://172.16.207.153/test/2.gif", 0 global main... (1 Reply)
Discussion started by: recher.jack
1 Replies

12. AIX

Getting error when instrumenting a C program with Purify

When I use this command: purify gcc -g hello_world.c to instrument a C program with Purify, I get this error : Purify engine:Error: The /usr/lib/syscalls.imp file either does not exist or has incorrect permissions.You may need to install bos.adt.syscalls I understand that I need to install... (11 Replies)
Discussion started by: SteAlma
11 Replies

13. UNIX for Beginners Questions & Answers

SSL_ERROR_SYSCALL in connection to qa-api.ncl.com:443

I am getting SSL_ERROR_SYSCALL in connection to qa-api.ncl.com:443. Please help me on this. But I am able to get response in Soap UI. Please use CODE tags when displaying sample input, output, and code segments. (13 Replies)
Discussion started by: Ayeesha
13 Replies