where are Library funtion definitions stored?
I want to know the path where i can find the library function definitions. I want the definition for copy_to_user() function in particular. Please help.
|
Welcome to LQ.
What library functions are you referring to? e.g. Linux utilities, C libraries, Python, etc.? Try entering "copy_to_user" in a Google search. |
copy_to_user is one of two functions used to copy data between kernel space and user-space.
It is a kernel function, not a library function. You will find its definition somewhere under /usr/include/linux, assuming that you have the kernel headers installed. |
Quote:
|
Quote:
The methods with leading underscores (__copy_user etc) are normally implementation methods that you wouldn't use directly. You can normally ignore these unless you are looking at how it works. Hope that helps, 由obert J Lee |
Quote:
#define copy_to_user(to,from,n) indirect_copy_user(to,from,n) #define __copy_to_user(to,from,n) __indirect_copy_user(to,from,n) #define __copy_to_user __direct_copy_user Could you please give some further assitance... |
Quote:
Code:
copy_to_user(a,b,c) Code:
indirect_copy_user(a,b,c) In general, the symbols with two underscores are implementations of the ones without them; __indirect_copy_user would implement the logic behind indirect_copy_user. This is done so that extra checking can be put into the "public" symbol, if the architecture allows it. If you're just interested to know what copy_to_user and copy_from_user do, then you might be better off looking at a reference on kernel programming; you might try http://kernelbook.sourceforge.net/ There's also a manpage for the copy_to_user call at http://www.gnugeneration.com/mirrors...api/r4299.html Hope that helps, 由obert J Lee |
Quote:
I read the header file for the fn. "pcibios_read_config_dword()" as "bios32.h". But i couldn't found only "bios32.c" where the function call for "pcibios_read_config_dword()" is made. Also I found the fn. declaration in "pci.h" and a macro mapping to "pci_read_config_dword" in "compatmac.h". I need the definition for "pcibios_read_config_dword()"........ please help |
Quote:
Quote:
Hope that helps, 由obert J Lee |
Quote:
pci.h compatmac.h bios32.c Where can I find the definition just like copy_to_user()? |
Here's one definition, for ARM processors. The location may vary between different processors, and possibly different architecture types:
http://www.srcdoc.com/linux_2.2.26/d...ce.html#l00079 Yours, —Robert J Lee |
All times are GMT -5. The time now is 07:38 AM. |