Results 1 to 3 of 3
What is the first function run in uClibc when user application call read(...)?
I only could find
Code:
_syscall3(ssize_t, read, int, fd, __ptr_t, buf, size_t, count)
#ifndef __LINUXTHREADS_OLD__
libc_hidden_def(read)
#else
...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-25-2012 #1Just Joined!
- Join Date
- Jul 2007
- Posts
- 3
'read' function in uClibc 0.9.32
What is the first function run in uClibc when user application call read(...)?
I only could find
under uClibc-0.9.32\libc\sysdeps\linux\common\read.c.Code:_syscall3(ssize_t, read, int, fd, __ptr_t, buf, size_t, count) #ifndef __LINUXTHREADS_OLD__ libc_hidden_def(read) #else libc_hidden_weak(read) strong_alias(read,__libc_read) #endif
Thank you.
- 01-26-2012 #2Just Joined!
- Join Date
- Jan 2011
- Location
- Fairfax, Virginia, USA
- Posts
- 94
Hi unifoxz,
Read is a system call ... its not a library call. I don't have a solid understanding of the mechanics of how this works to be honest, but the interface is usually something like <syscall.h>. When a user space application issues a system call, the call is translated into an integer and the associated data is passed to the kernel in one of two ways. The use space application usually blocks waiting for the kernel to complete its system call. I don't think you'll find a "C" interface in (uc)libc.so, but like I said ... I'm not an expert here.
- 02-01-2012 #3Just Joined!
- Join Date
- Jan 2007
- Posts
- 9
Get the system calls using strace.
get the call sequence using some debugging tool like strace.


Reply With Quote

