Solved

Thread Safe in DB or gdbm

Posted on 1998-03-03
4
567 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 50 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now