IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 5538


Ignore:
Timestamp:
Nov 17, 2005, 3:35:53 PM (21 years ago)
Author:
Paul Price
Message:

Added requirement on dynamic setting of mutex locks: psMemThreadSafety.

Location:
trunk/doc/pslib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/pslib/ChangeLogSDRS.tex

    r5537 r5538  
    1 %%% $Id: ChangeLogSDRS.tex,v 1.180 2005-11-18 00:27:19 price Exp $
     1%%% $Id: ChangeLogSDRS.tex,v 1.181 2005-11-18 01:35:49 price Exp $
    22
    33\subsection{Changes from version 00 to version 01}
     
    827827\item Updated \code{psImageTransform} to use \code{psPixels} for
    828828  \code{blankPixels} instead of a \code{psArray}.
    829 \end{itemize}
     829\item Added requirement on dynamic setting of mutex locks:
     830  \code{psMemThreadSafety} (see bug 586).
     831\end{itemize}
  • trunk/doc/pslib/psLibSDRS.tex

    r5536 r5538  
    1 %%% $Id: psLibSDRS.tex,v 1.356 2005-11-18 00:26:19 price Exp $
     1%%% $Id: psLibSDRS.tex,v 1.357 2005-11-18 01:35:53 price Exp $
    22\documentclass[panstarrs,spec]{panstarrs}
    33
     
    163163  (Sections~\ref{sec:memory} \&~\ref{sec:errors}), must be written to
    164164  be thread-safe, since we cannot risk this crucial area being
    165   unstable.
     165  unstable.  However, this can have a large impact on the efficiency
     166  of the code, and so we specify that this behaviour may be activated
     167  and deactivated dynamically.  The default behaviour, however, will
     168  be thread-safety, since it is more important to err on the side of
     169  being safe rather than efficient. 
    166170\item Re-entrant versions of system calls and external library
    167171  functions should be used.  We expect that these cases are
     
    794798in the valid range and must correspond to the address of the
    795799\code{psMemBlock}).
     800
     801\subsubsection{Thread safety}
     802
     803Locking a mutex is an expensive operation that can dramatically impact
     804the efficiency of a program for the worse.  When the user is not
     805concerned with multiple threads, this is a needless waste, and so we
     806specify that the thread safety in the memory management system may
     807be deactivated (and activated) dynamically.
     808
     809\begin{prototype}
     810bool psMemThreadSafety(bool safe);
     811\end{prototype}
     812
     813\code{psMemThreadSafety} shall turn on thread safety in the memory
     814management functions if \code{safe} is \code{true}, and deactivate all
     815mutex locking in the memory management functions if \code{safe} is
     816\code{false}.  The function shall return the previous value of the
     817thread safety.
     818
     819Note that the default behaviour of the library shall be for the
     820locking to be performed.
    796821
    797822\subsubsection{Relation of Memory Management to Structures}
Note: See TracChangeset for help on using the changeset viewer.