summaryrefslogtreecommitdiff
path: root/src/xine-engine/xine_internal.h
diff options
context:
space:
mode:
authorReinhard Nißl <rnissl@gmx.de>2007-04-13 00:17:30 +0200
committerReinhard Nißl <rnissl@gmx.de>2007-04-13 00:17:30 +0200
commit0638ad373d88c3ed45273a505df56626daba19a0 (patch)
tree5df24fd7d6686f057a3fa90f486cae6ddd27a350 /src/xine-engine/xine_internal.h
parentb4304f243c6006eec3ca4b4ce2b19cfca703861a (diff)
downloadxine-lib-0638ad373d88c3ed45273a505df56626daba19a0.tar.gz
xine-lib-0638ad373d88c3ed45273a505df56626daba19a0.tar.bz2
Provide ability to lock port rewiring.
The idea is to allow only a "single" frontend to rewire ports at a certain point in time. Regarding a stream, frontend_lock is used for example to allow only a single frontend to change the speed. Unfortunately, frontend_lock cannot be used as the rewire functions are not stream related. Therefore a new port_rewiring_lock was introduced and used at appropriate locations. When an arbitrary thread now holds the frontend_lock and the port_rewiring_lock, it is safe that acquiring a port ticket in functions like xine_get_current_frame() will never block the thread.
Diffstat (limited to 'src/xine-engine/xine_internal.h')
-rw-r--r--src/xine-engine/xine_internal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h
index da6f88a7f..e11c3e667 100644
--- a/src/xine-engine/xine_internal.h
+++ b/src/xine-engine/xine_internal.h
@@ -168,6 +168,9 @@ struct xine_ticket_s {
* be used in combination with acquire_nonblocking() */
void (*release_nonblocking)(xine_ticket_t *self, int irrevocable);
+ int (*lock_port_rewiring)(xine_ticket_t *self, int ms_timeout);
+ void (*unlock_port_rewiring)(xine_ticket_t *self);
+
void (*dispose)(xine_ticket_t *self);
pthread_mutex_t lock;
@@ -179,6 +182,7 @@ struct xine_ticket_s {
int pending_revocations;
int atomic_revoke;
pthread_t atomic_revoker_thread;
+ pthread_mutex_t port_rewiring_lock;
#endif
};