Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Thread Safe in DB or gdbm

Posted on 1998-03-03
4
Medium Priority
?
681 Views
Last Modified: 2013-12-26
Hello,
I am a FreeBSD user.  I noticed that there are two datbase manager libraries which are db.h and gdbm .  I wonder do these libaries are "thread safe"?  Do they have synchronization code inside their code ?
0
Comment
Question by:andrewma
  • 2
4 Comments
 

Expert Comment

by:aditya070797
ID: 1296085
Hi andrewma,
     I don't know if FreeBSD supports threads or not, but I would check the man pages for gdbm/dbm, and if the man page does not mention that these are thread-safe, you can assume that they are not thread-safe. There is a difference in being thread safe and having synchronization code though, the library code might have synchronization code, but might be completely thread-unsafe.
    I would check the man pages and any accompanying documentation.
--Aditya
0
 

Expert Comment

by:dps96r
ID: 1296086
I know this is version dependent
  - Ancient versions of berkley db lack the proper flock stuff
  - At least most version of berkley db and gdbm, are not thread safe
  - The glibc 2.x version might be thread safe,

Duncan (-:
0
 

Author Comment

by:andrewma
ID: 1296087
Thanks
0
 

Accepted Solution

by:
dps96r earned 200 total points
ID: 1296088
As far as I know the glibc 1.x versions are not thread safe but
glibc 2.x versions are thread safe. Judging by the sysdeps
directoires the glibc 2.x source supports FreeBSD. If uo have a
clone(2) system call the LinuxThreads stuff should compile easily.

glibc 2.x includes supports both sorts of databases and only
breaks a few programs (classic things are declarations of things
like sys_errlist...) glibc 2.x *is* linux libc 6 as used in RedHast 5.0, for example.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Suggested Courses

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question