| | |
system calls and high level statements
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
Hi,
if any one has the idea of the internal system calls which gets activated by using high level statements ( like printf ,scanf or malloc and so on) please provide me the links or any related info.
i have an idea that the internal system calls depends on the OS/Compiler.
but i want a comprehensive description of all or few poupular OS system calls/ high level statements.
if any one has the idea of the internal system calls which gets activated by using high level statements ( like printf ,scanf or malloc and so on) please provide me the links or any related info.
i have an idea that the internal system calls depends on the OS/Compiler.
but i want a comprehensive description of all or few poupular OS system calls/ high level statements.
Minds are like parachutes - they only work when they are open
Gaiety
Gaiety
-7
#3 Oct 22nd, 2009
I've used a debugger to step through some of the printf() code on MS-Windows and found that eventually it calls win32 api WriteFile(). From that experience I would imagine other functions also eventually call win32 api functions. But those are the details that are compiler-implementation specific. There is nothing in the c or c++ standards that tell compiler writers how to implement the standard functions; they are free to do it any way they want to.
I told Santa what I wanted for Christmas and he washed my mouth out with soap.
0
#4 Oct 22nd, 2009
i googled for some time but dint find any use full rather related information about different OS system calls.
what i got was these below links but these are not having much related info.
<http://www.google.co.in/search?hl=en&q=system+calls+in+operating+system&meta=&aq=2&oq=system+calls+>
http://www.google.co.in/search?hl=en...meta=&aq=f&oq=
http://www.google.co.in/search?hl=en...meta=&aq=f&oq=
so i thought some one else would be having some other info.
Minds are like parachutes - they only work when they are open
Gaiety
Gaiety
0
#5 Oct 22nd, 2009
•
•
•
•
I've used a debugger to step through some of the printf() code on MS-Windows and found that eventually it calls win32 api WriteFile(). From that experience I would imagine other functions also eventually call win32 api functions. But those are the details that are compiler-implementation specific. There is nothing in the c or c++ standards that tell compiler writers how to implement the standard functions; they are free to do it any way they want to.
Thanks for your response Dragon.
actually i work on linux OS and here i can find that read and write system calls are used as internal functions of scanf and printf.
( confused here on how the mapping is done between read ,write and scanf ,printf. because read/write takes file descriptors, buffers and size of data where as printf and scanf takes the variable lenght args: format strings and arguments)
similarly all the dma functions(malloc,calloc, realloc, memset,memcpy, memmove) also uses some built in system calls.
i just want to know is there any source that describes the library functions and whose corresponding system calls on different OS's.
i googled for some time but dint get any appropriate info.
Minds are like parachutes - they only work when they are open
Gaiety
Gaiety
1
#6 Oct 22nd, 2009
If your looking for the source code for Linux system calls then download the kernel source code for your Linux distro and you'll find it there...The first file you want to investigate is - Entry.S - this file has all the code for the interrupt/syscall call that handles the dispatch....
Also this link may shed some light
http://asm.sourceforge.net/syscall.html#p3
Also this link may shed some light
http://asm.sourceforge.net/syscall.html#p3
Last edited by gerard4143; Oct 22nd, 2009 at 9:19 am.
1
#7 Oct 22nd, 2009
•
•
•
•
confused here on how the mapping is done between read ,write and scanf ,printf. because read/write takes file descriptors, buffers and size of data where as printf and scanf takes the variable lenght args: format strings and arguments
-Tommy (For Great Justice!) Gunn
-7
#8 Oct 22nd, 2009
•
•
•
•
( confused here on how the mapping is done between read ,write and scanf ,printf. because read/write takes file descriptors, buffers and size of data where as printf and scanf takes the variable lenght args: format strings and arguments)
There are descriptions of the system functions for each operating system, but you won't find them all in one convenient document. You will have to study each os that you are interested in.
I told Santa what I wanted for Christmas and he washed my mouth out with soap.
![]() |
Similar Threads
- Help with this program that uses Unix I/O system calls (C)
- How to call system calls in VC++? (C++)
- Four questions (Assembly)
- NASM: win32 interrupt and system calls (Assembly)
- Conversion Assembly to High Level Languages (Assembly)
- File descriptors (C)
- High Level Assembly HELP!!! (Legacy and Other Languages)
- High-Level Languages (Computer Science)
Other Threads in the C Forum
- Previous Thread: Setting up C compiler
- Next Thread: clock() returning 0?
Views: 408 | Replies: 9
| Thread Tools | Search this Thread |
Tag cloud for C
adobe ansi api array arrays bash binarysearch centimeter char character convert copyanyfile copypdffile createcopyoffile createprocess() csyntax directory drawing dynamic executable feet fflush file floatingpointvalidation fork frequency getlasterror getlogicaldrivestrin givemetehcodez global graphics gtkgcurlcompiling hardware highest homework i/o ide infiniteloop initialization interest intmain() kilometer lazy license linked linkedlist linux linuxsegmentationfault list match matrix meter microsoft multi mysql oddnumber odf open openwebfoundation pattern pause pdf pointer pointers posix power program programming pyramidusingturboccodes read recursion recv recvblocked repetition scheduling segmentationfault send shape single socketprogramming spoonfeeding stack standard strchr string strings structures student suggestions system test testautomation unix urboc user visualstudio voidmain() win32 win32api windows.h







