Lock.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /* $XConsortium: Lock.h /main/1 1996/04/13 11:53:37 ageorge $ */
  24. /* *
  25. * (c) Copyright 1996 Hewlett-Packard Company *
  26. * (c) Copyright 1996 International Business Machines Corp. *
  27. * (c) Copyright 1996 Sun Microsystems, Inc. *
  28. * (c) Copyright 1996 Novell, Inc. *
  29. * (c) Copyright 1996 Digital Equipment Corporation. *
  30. * (c) Copyright 1996 FUJITSU LIMITED. *
  31. * (c) Copyright 1996 Hitachi. *
  32. */
  33. #ifndef _Dt_Lock_h
  34. #define _Dt_Lock_h
  35. /******** Conditionally defined macros for thread_safe DtHelp ******/
  36. #ifdef XTHREADS
  37. #define _DtHelpWidgetToAppContext(w) \
  38. XtAppContext app = XtWidgetToApplicationContext(w)
  39. #define _DtHelpDisplayToAppContext(d) \
  40. XtAppContext app = XtDisplayToApplicationContext(d)
  41. #define _DtHelpAppLock(app) XtAppLock(app)
  42. #define _DtHelpAppUnlock(app) XtAppUnlock(app)
  43. #define _DtHelpProcessLock() XtProcessLock()
  44. #define _DtHelpProcessUnlock() XtProcessUnlock()
  45. #else /* XTHREADS */
  46. #define _DtHelpWidgetToAppContext(w)
  47. #define _DtHelpDisplayToAppContext(d)
  48. #define _DtHelpAppLock(app)
  49. #define _DtHelpAppUnlock(app)
  50. #define _DtHelpProcessLock()
  51. #define _DtHelpProcessUnlock()
  52. #endif /* XTHREADS */
  53. #endif /* _Dt_Lock_h */
  54. /* DON'T ADD ANYTHING AFTER THIS #endif... */