473,398 Members | 2,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

basic doubt on shared libraries


Hi Friends,

Could you please tell me about,

1. What a shared library in c contains
2. (.a) file extension for shared libraries.
3. Is shared libraries are reentrant.
Thanking you in advance,
ragi

Aug 26 '06 #1
3 2525
In article <11**********************@m73g2000cwd.googlegroups .com>,
ragi <ra******@gmail.comwrote:
Could you please tell me about,
1. What a shared library in c contains
2. (.a) file extension for shared libraries.
3. Is shared libraries are reentrant.
In answer to your first question: NO, all of those are off-topic
here. Shared libraries mean different things in different implementations.
As in a newsgroup more specific to your implementation.
--
Prototypes are supertypes of their clones. -- maplesoft
Aug 26 '06 #2
There is a wikipedia entry for Library which explains shared libraries:
http://en.wikipedia.org/wiki/Library_(computer_science)
I may be wrong, but I think whether a library (function) is reentrant
or not depends on how you code it. You can use some non-reentrant
system call or library function in your library, and then your library
becomes non-reentrant. If you use reentrant system calls or functions
in your library, then your library is reentrant. Actually, I think it
is more correct to say whether a function, rather than a library, is
reentrant. Some functions in a library may be reentrant, whereas
others in the same library are non-reentrant.

Aug 27 '06 #3
>There is a wikipedia entry for Library which explains shared libraries:
>http://en.wikipedia.org/wiki/Library_(computer_science)
I may be wrong, but I think whether a library (function) is reentrant
or not depends on how you code it.
True, it's possible to make a function non-reentrant unnecessarily
by poor cooding.

However, some functions, like strtok() as defined by Standard C,
cannot be made reentrant and still conform to the requirements for
the function. You can sometimes add an argument that points to
storage that holds state for the function to make it reentrant, but
then it no longer has the same function signature required. It's
now a different function and it needs a different name.
>You can use some non-reentrant
system call or library function in your library, and then your library
becomes non-reentrant.
If you use reentrant system calls or functions
in your library, then your library is reentrant. Actually, I think it
is more correct to say whether a function, rather than a library, is
reentrant.
A reasonable definition of a "reentrant library" would seem to be:
A library is reentrant if and only if all of the functions in it
are reentrant.
>Some functions in a library may be reentrant, whereas
others in the same library are non-reentrant.
It is sometimes the case that a non-reentrant initialization function
must be called before any of the other functions are used, and that
the reentrant functions use a number of "write-once" variables set
by the initialization function (for example, loading locale-specific
messages for the appropriate language). This would make the library
non-reentrant even if there is no explicit call to the initialization
function since the shared library mechanism automatically calls it.

Aug 27 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Phil | last post by:
I realize this is the php group, but I have a question that recurses back to my php install. My objective is a pure 64 bit shared object installation of php 5.0 on UltraSparc Solaris 9 compiled...
0
by: Frieder Loercher | last post by:
Hello, I am developping a (lammpi) parallel Application where any of the processes uses the Python script language. It works fine on Compaq Alpha and SUN Solaris5.9 On AIX5.1, it doesn't...
3
by: Rickard Lind | last post by:
Is there any way to build the python executable statically and still be able to load modules built as shared libraries? I'm trying to run python scripts on a stripped down FreeBSD (4.9) machine...
1
by: rinku24 | last post by:
We have two C++ libraries (Unix Shared objects) with the same class name and no namespace. Is there any way to load both the libraries and selectivly create the instance of the class from...
5
by: David T. Ashley | last post by:
I've occasionally had trouble compiling and linking programs that use shared libraries. That never made a lot of sense to me, because I thought the operating system went hunting for the symbols...
2
by: Tobias Bergmann | last post by:
Hi, I work on a big project that consists of many small linux C++ CGI binaries. This actually works fine but our problem is that we use many ..so libraries and we need to compile it separately...
3
by: Bala | last post by:
Hello, I am trying to create a shared library on solaris. The inputs to this library is a source file and then 2 static libraries. I need to call code within the shared library in another...
3
by: S S | last post by:
Hi Are there some known issues using STL with shared library. Recently I got some crash for which the reason I dont see any, and searching on goolge shown some such issues with shared library. ...
4
by: stuntgoat | last post by:
Hi, I want to start using Python 2.6 and 3000. I have several questions. What, in your experiences, is a functionally elegant solution to installing 2.6 and 3 from source without breaking...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.