/[svn]/linuxsampler/trunk/src/common/SynchronizedConfig.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/common/SynchronizedConfig.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1887 by persson, Sat Apr 18 08:17:16 2009 UTC revision 2343 by persson, Sun Apr 29 16:14:45 2012 UTC
# Line 1  Line 1 
1  /***************************************************************************  /***************************************************************************
2   *                                                                         *   *                                                                         *
3   *   Copyright (C) 2006-2009 Andreas Persson                               *   *   Copyright (C) 2006-2012 Andreas Persson                               *
4   *                                                                         *   *                                                                         *
5   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
6   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 28  Line 28 
28  namespace LinuxSampler {  namespace LinuxSampler {
29    
30      /**      /**
31       * Thread safe management of configuration data, where the data is       * Thread-safe management of configuration data, where the data is
32       * updated by a single non real time thread and read by a number       * updated by a single non real time thread and read by a number
33       * of real time threads.       * of real time threads.
34       *       *
# Line 46  namespace LinuxSampler { Line 46  namespace LinuxSampler {
46       * the data to be read, and Unlock() must be called when finished       * the data to be read, and Unlock() must be called when finished
47       * reading the data. (Neither Lock nor Unlock will block the real       * reading the data. (Neither Lock nor Unlock will block the real
48       * time thread, or use any system calls.)       * time thread, or use any system calls.)
49         *
50         * Note that the non real time side isn't safe for concurrent
51         * access, so if there are multiple non real time threads that
52         * update the configuration data, a mutex has to be used.
53         *
54         * Implementation note: the memory order parameters and fences are
55         * very carefully chosen to make the code fast but still safe for
56         * memory access reordering made by the CPU.
57       */       */
58      template<class T>      template<class T>
59      class SynchronizedConfig {      class SynchronizedConfig {

Legend:
Removed from v.1887  
changed lines
  Added in v.2343

  ViewVC Help
Powered by ViewVC