]> git.pond.sub.org Git - empserver/blobdiff - include/empthread.h
License upgrade to GPL version 3 or later
[empserver] / include / empthread.h
index d06efb10abf5f47c567470f3f9c8144b0f256ca7..ffbb36ce7aa335be48c003c74077ec82232cfc74 100644 (file)
@@ -1,11 +1,11 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
- *                           Ken Stevens, Steve McClure
+ *  Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *                Ken Stevens, Steve McClure, Markus Armbruster
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  Empire is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
+ *  the Free Software Foundation, either version 3 of the License, or
  *  (at your option) any later version.
  *
  *  This program is distributed in the hope that it will be useful,
@@ -14,8 +14,7 @@
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  *  ---
  *
@@ -31,7 +30,7 @@
  *     Sasha Mikheev
  *     Doug Hay, 1998
  *     Steve McClure, 1998
- *     Markus Armbruster, 2005-2008
+ *     Markus Armbruster, 2005-2009
  *     Ron Koenderink, 2005-2009
  */
 
 
 /* Abstract data types */
 
-/* empth_t * represents a thread.  */
+/* A thread.  */
 typedef struct lwpProc empth_t;
 
-/* empth_rwlock_t * represents a read-write lock */
+/* A read-write lock, perferring writers */
 typedef struct lwp_rwlock empth_rwlock_t;
 
 /* Flags for empth_select(): whether to sleep on input or output */
@@ -189,7 +188,7 @@ int empth_wait_for_signal(void);
 /*
  * Create a read-write lock.
  * NAME is its name, it is used for debugging.
- * Return the reade-write lock, or NULL on error.
+ * Return the read-write lock, or NULL on error.
  */
 empth_rwlock_t *empth_rwlock_create(char *name);
 
@@ -209,9 +208,9 @@ void empth_rwlock_wrlock(empth_rwlock_t *rwlock);
 /*
  * Lock RWLOCK for reading.
  * A read-write lock can be locked for reading only when it is not
- * locked for writing.  If this is not the case, put the current
- * thread to sleep until it is.  Must not starve writers, and may
- * sleep to avoid that.
+ * locked for writing, and no other thread is attempting to lock it
+ * for writing.  If this is not the case, put the current thread to
+ * sleep until it is.
  */
 void empth_rwlock_rdlock(empth_rwlock_t *rwlock);