]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/thread.c
Several libcups files did not have the Apple license exception notice (STR #4361)
[thirdparty/cups.git] / cups / thread.c
index 7574298fafb839cffd5d1f8719a40d9654387abd..c9c5cfb49357d2eb6305868baa1727aa9be24d79 100644 (file)
@@ -1,26 +1,17 @@
 /*
  * "$Id$"
  *
- *   Threading primitives for CUPS.
+ * Threading primitives for CUPS.
  *
- *   Copyright 2009-2010 by Apple Inc.
+ * Copyright 2009-2014 by Apple Inc.
  *
- *   These coded instructions, statements, and computer programs are the
- *   property of Apple Inc. and are protected by Federal copyright
- *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
- *   which should have been included with this file.  If this file is
- *   file is missing or damaged, see the license at "http://www.cups.org/".
+ * These coded instructions, statements, and computer programs are the
+ * property of Apple Inc. and are protected by Federal copyright
+ * law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+ * which should have been included with this file.  If this file is
+ * file is missing or damaged, see the license at "http://www.cups.org/".
  *
- * Contents:
- *
- *   _cupsMutexInit()    - Initialize a mutex.
- *   _cupsMutexLock()    - Lock a mutex.
- *   _cupsMutexUnlock()  - Unlock a mutex.
- *   _cupsRWInit()       - Initialize a reader/writer lock.
- *   _cupsRWLockRead()   - Acquire a reader/writer lock for reading.
- *   _cupsRWLockWrite()  - Acquire a reader/writer lock for writing.
- *   _cupsRWUnlock()     - Release a reader/writer lock.
- *   _cupsThreadCreate() - Create a thread.
+ * This file is subject to the Apple OS-Developed Software exception.
  */
 
 /*
@@ -113,7 +104,7 @@ _cupsRWUnlock(_cups_rwlock_t *rwlock)       /* I - Reader/writer lock */
  * '_cupsThreadCreate()' - Create a thread.
  */
 
-int                                    /* O - 0 on failure, 1 on success */    
+int                                    /* O - 0 on failure, 1 on success */
 _cupsThreadCreate(
     _cups_thread_func_t func,          /* I - Entry point */
     void                *arg)          /* I - Entry point context */
@@ -223,7 +214,7 @@ _cupsRWUnlock(_cups_rwlock_t *rwlock)       /* I - Reader/writer lock */
  * '_cupsThreadCreate()' - Create a thread.
  */
 
-int                                    /* O - 0 on failure, 1 on success */    
+int                                    /* O - 0 on failure, 1 on success */
 _cupsThreadCreate(
     _cups_thread_func_t func,          /* I - Entry point */
     void                *arg)          /* I - Entry point context */
@@ -309,6 +300,25 @@ _cupsRWUnlock(_cups_rwlock_t *rwlock)      /* I - Reader/writer lock */
 {
   (void)rwlock;
 }
+
+
+/*
+ * '_cupsThreadCreate()' - Create a thread.
+ */
+
+int                                    /* O - 0 on failure, 1 on success */
+_cupsThreadCreate(
+    _cups_thread_func_t func,          /* I - Entry point */
+    void                *arg)          /* I - Entry point context */
+{
+  fputs("DEBUG: CUPS was compiled without threading support, no thread "
+        "created.\n", stderr);
+
+  (void)func;
+  (void)arg;
+
+  return (0);
+}
 #endif /* HAVE_PTHREAD_H */