[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

1600.0. "trouble linking with nDBm and MIR rtns" by RIVAGE::BACCAR () Fri Oct 04 1991 11:15

   I'm writting an application on the top of nDBm package, and because the MIR
is also built on the top of nDBm, I thinck that my application could interfere
with the MIR. In others word, I protect the nDBm routines from thread re-entrance
using a CMA mutex ( jacket package), and from concurrent process write access 
using the ULTRIX flock system call ( and I thinck that the MIR do the same 
thing ). Then we share the same nDBm routines with two different mutexes, AIE..
( bad in french ..).  Is there a way to avoid this conflict ?
Following are suggestions:
  1 - : I use the MIR mutex to mutex-lock my routines before calling to
nDBm routines.
  2 - : I link my program with an nDBm protected routines (the same routines
as used to build the MIR routines)
 
note: I used nDBm and the MIR ( in the same process) in my application.

T.RTitleUserPersonal
Name
DateLines
1600.1TOOK::SWISTJim Swist LKG2-2/T2 DTN 226-7102Fri Oct 04 1991 11:468
    Aucun probleme.
    
    All non-reentrant operating system routines are protected with the SAME
    mutex, which is the one hidden behind mcc_mutex_lock_global
    (cma_mutex_lock_global).   That's why the global mutex was invented.
    Do not use a private mutex to protect OS routines because it won't
    work, as your note correctly deduces.  Bonne chance.
    
1600.2TOOK::SWISTJim Swist LKG2-2/T2 DTN 226-7102Fri Oct 04 1991 11:584
    And as an aside, aren't you (we) glad they invented ndbm?   With the old dbm
    routines, you couldn't open more than one DBM file at a time PER
    PROCESS.  Yuck.
    
1600.3reply 1600.2RIVAGE::BACCARMon Oct 07 1991 10:382
  the global mutex of course ...
   thanck you for your help .