[xiph-cvs] cvs commit: vorbis-tools/ogg123 compat.h Makefile.am buffer.c buffer.h http_transport.c ogg123.c ogg123.h
Stan Seibert
volsung at xiph.org
Mon Dec 17 20:15:51 PST 2001
volsung 01/12/17 20:15:50
Modified: . Tag: volsung_kc_20011011 acinclude.m4
ogg123 Tag: volsung_kc_20011011 Makefile.am buffer.c
buffer.h http_transport.c ogg123.c ogg123.h
Added: ogg123 Tag: volsung_kc_20011011 compat.h
Log:
More pthreads fixes: Prefer -lpthread to -pthread (fixes bug on OpenBSD)
http thread handling more correct now
Revision Changes Path
No revision
No revision
1.9.4.5 +1 -1 vorbis-tools/acinclude.m4
Index: acinclude.m4
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/acinclude.m4,v
retrieving revision 1.9.4.4
retrieving revision 1.9.4.5
diff -u -r1.9.4.4 -r1.9.4.5
--- acinclude.m4 2001/12/18 02:38:06 1.9.4.4
+++ acinclude.m4 2001/12/18 04:15:43 1.9.4.5
@@ -551,7 +551,7 @@
# C compiler flags, and other items are library names, except for "none"
# which indicates that we try without any flags at all.
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
+acx_pthread_flags="pthreads none -Kthread -kthread lthread pthread -pthread -pthreads -mthreads --thread-safe -mt"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
No revision
No revision
1.14.2.4.2.10 +1 -1 vorbis-tools/ogg123/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/Makefile.am,v
retrieving revision 1.14.2.4.2.9
retrieving revision 1.14.2.4.2.10
diff -u -r1.14.2.4.2.9 -r1.14.2.4.2.10
--- Makefile.am 2001/12/18 02:38:09 1.14.2.4.2.9
+++ Makefile.am 2001/12/18 04:15:44 1.14.2.4.2.10
@@ -19,7 +19,7 @@
cfgfile_options.c cmdline_options.c \
file_transport.c format.c http_transport.c \
ogg123.c oggvorbis_format.c status.c transport.c \
- audio.h buffer.h callbacks.h \
+ audio.h buffer.h callbacks.h compat.h \
cfgfile_options.h cmdline_options.h \
format.h ogg123.h status.h transport.h
1.7.2.23.2.10 +11 -2 vorbis-tools/ogg123/buffer.c
Index: buffer.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/buffer.c,v
retrieving revision 1.7.2.23.2.9
retrieving revision 1.7.2.23.2.10
diff -u -r1.7.2.23.2.9 -r1.7.2.23.2.10
--- buffer.c 2001/12/12 15:52:24 1.7.2.23.2.9
+++ buffer.c 2001/12/18 04:15:44 1.7.2.23.2.10
@@ -11,7 +11,7 @@
* *
********************************************************************
- last mod: $Id: buffer.c,v 1.7.2.23.2.9 2001/12/12 15:52:24 volsung Exp $
+ last mod: $Id: buffer.c,v 1.7.2.23.2.10 2001/12/18 04:15:44 volsung Exp $
********************************************************************/
@@ -25,6 +25,7 @@
#include <unistd.h>
#include <stdio.h>
+#include "compat.h"
#include "buffer.h"
#define MIN(x,y) ( (x) < (y) ? (x) : (y) )
@@ -75,7 +76,6 @@
sigaddset (&set, SIGCONT);
if (pthread_sigmask (SIG_BLOCK, &set, NULL) != 0)
DEBUG("pthread_sigmask failed");
-
}
@@ -542,6 +542,15 @@
buf->prebuffering = 0;
COND_SIGNAL(buf->playback_cond);
UNLOCK_MUTEX(buf->mutex);
+}
+
+void buffer_abort_write (buf_t *buf)
+{
+ DEBUG("buffer_mark_eos");
+
+ LOCK_MUTEX(buf->mutex);
+ COND_SIGNAL(buf->write_cond);
+ UNLOCK_MUTEX(buf->mutex);
}
1.2.2.16.2.6 +2 -1 vorbis-tools/ogg123/buffer.h
Index: buffer.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/buffer.h,v
retrieving revision 1.2.2.16.2.5
retrieving revision 1.2.2.16.2.6
diff -u -r1.2.2.16.2.5 -r1.2.2.16.2.6
--- buffer.h 2001/12/11 05:29:08 1.2.2.16.2.5
+++ buffer.h 2001/12/18 04:15:44 1.2.2.16.2.6
@@ -11,7 +11,7 @@
* *
********************************************************************
- last mod: $Id: buffer.h,v 1.2.2.16.2.5 2001/12/11 05:29:08 volsung Exp $
+ last mod: $Id: buffer.h,v 1.2.2.16.2.6 2001/12/18 04:15:44 volsung Exp $
********************************************************************/
@@ -110,6 +110,7 @@
size_t buffer_get_data (buf_t *buf, char *data, long nbytes);
void buffer_mark_eos (buf_t *buf);
+void buffer_abort_write (buf_t *buf);
/* --- Action buffering functions --- */
void buffer_action_now (buf_t *buf, action_func_t action_func,
1.1.2.2 +13 -3 vorbis-tools/ogg123/Attic/http_transport.c
Index: http_transport.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/Attic/http_transport.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -r1.1.2.1 -r1.1.2.2
--- http_transport.c 2001/12/14 05:45:14 1.1.2.1
+++ http_transport.c 2001/12/18 04:15:45 1.1.2.2
@@ -11,7 +11,7 @@
* *
********************************************************************
- last mod: $Id: http_transport.c,v 1.1.2.1 2001/12/14 05:45:14 volsung Exp $
+ last mod: $Id: http_transport.c,v 1.1.2.2 2001/12/18 04:15:45 volsung Exp $
********************************************************************/
@@ -104,7 +104,16 @@
{
curl_thread_arg_t *myarg = (curl_thread_arg_t *) arg;
CURLcode ret;
+ sigset_t set;
+ /* Block signals to this thread */
+ sigfillset (&set);
+ sigaddset (&set, SIGINT);
+ sigaddset (&set, SIGTSTP);
+ sigaddset (&set, SIGCONT);
+ if (pthread_sigmask (SIG_BLOCK, &set, NULL) != 0)
+ status_error("Error: Could not set signal mask.");
+
ret = curl_easy_perform((CURL *) myarg->curl_handle);
buffer_mark_eos(myarg->buf);
@@ -256,8 +265,9 @@
{
http_private_t *private = source->private;
- pthread_kill (private->curl_thread, SIGTERM);
- pthread_join (private->curl_thread, NULL);
+ pthread_cancel(private->curl_thread);
+ buffer_abort_write(private->buf);
+ pthread_join(private->curl_thread, NULL);
buffer_destroy(private->buf);
private->buf = NULL;
1.39.2.30.2.26 +2 -1 vorbis-tools/ogg123/ogg123.c
Index: ogg123.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/ogg123.c,v
retrieving revision 1.39.2.30.2.25
retrieving revision 1.39.2.30.2.26
diff -u -r1.39.2.30.2.25 -r1.39.2.30.2.26
--- ogg123.c 2001/12/17 17:28:34 1.39.2.30.2.25
+++ ogg123.c 2001/12/18 04:15:45 1.39.2.30.2.26
@@ -14,7 +14,7 @@
* *
********************************************************************
- last mod: $Id: ogg123.c,v 1.39.2.30.2.25 2001/12/17 17:28:34 volsung Exp $
+ last mod: $Id: ogg123.c,v 1.39.2.30.2.26 2001/12/18 04:15:45 volsung Exp $
********************************************************************/
@@ -36,6 +36,7 @@
#include "format.h"
#include "transport.h"
#include "status.h"
+#include "compat.h"
#include "ogg123.h"
1.7.2.12.2.8 +1 -20 vorbis-tools/ogg123/ogg123.h
Index: ogg123.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/ogg123.h,v
retrieving revision 1.7.2.12.2.7
retrieving revision 1.7.2.12.2.8
diff -u -r1.7.2.12.2.7 -r1.7.2.12.2.8
--- ogg123.h 2001/12/11 18:46:23 1.7.2.12.2.7
+++ ogg123.h 2001/12/18 04:15:46 1.7.2.12.2.8
@@ -11,7 +11,7 @@
* *
********************************************************************
- last mod: $Id: ogg123.h,v 1.7.2.12.2.7 2001/12/11 18:46:23 volsung Exp $
+ last mod: $Id: ogg123.h,v 1.7.2.12.2.8 2001/12/18 04:15:46 volsung Exp $
********************************************************************/
@@ -20,25 +20,6 @@
#include <ogg/os_types.h>
#include "audio.h"
-
-/* Compatibility fixes */
-
-#ifdef __sun
-#include <alloca.h>
-#endif
-
-/* SunOS 4 does on_exit() and everything else does atexit() */
-#ifdef HAVE_ATEXIT
-#define ATEXIT(x) (atexit(x))
-#else
-#ifdef HAVE_ON_EXIT
-#define ATEXIT(x) (on_exit( (void (*)(int, void*))(x) , NULL)
-#else
-#define ATEXIT(x)
-#warning "Neither atexit() nor on_exit() is present. Bad things may happen when the application terminates."
-#endif
-#endif
-
typedef struct ogg123_options_t {
long int verbosity; /* Verbose output if > 1, quiet if 0 */
No revision
No revision
1.1.2.1 +37 -0 vorbis-tools/ogg123/Attic/compat.h
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list