1
mirror of https://code.videolan.org/videolan/vlc synced 2024-10-03 01:31:53 +02:00
Commit Graph

24 Commits

Author SHA1 Message Date
Hugo Beauzée-Luyssen
6e17f399bb lua: Remove dubious LockExtension/UnlockExtension 2017-03-30 13:48:29 +02:00
Hugo Beauzée-Luyssen
b56c999353 lua: Use QueueDeactivateCommand when suitable 2017-03-30 13:48:28 +02:00
Hugo Beauzée-Luyssen
6e266f5e8f lua: Don't attempt to deactivate the extension when killing it.
As the extension thread is holding the lock, and stuck while the lua
function is executing, when a timeout is detected, there's no way to
acquire the lock, not to execute the deactivate function in a thread
safe manner.
2017-03-30 13:48:28 +02:00
Hugo Beauzée-Luyssen
bb210fea61 lua: Split CMD_DEACTIVATE generation/queuing out of Deactivate 2017-03-30 13:48:28 +02:00
Hugo Beauzée-Luyssen
6a627ce841 lua: Properly support reactivation of the extension 2017-03-30 13:48:28 +02:00
Hugo Beauzée-Luyssen
04da2f7345 lua: Simplify activated extension detection 2017-03-30 11:58:29 +02:00
Hugo Beauzée-Luyssen
17648212c5 lua: Don't deactivate the extension when failing to create its thread
This is a noop since b_exiting is true, but even if it wasn't, there's
no thread to pick up the command anyway.
2017-03-30 11:49:03 +02:00
Hugo Beauzée-Luyssen
451b18c4a3 lua: Cleanup lua state once the thread has joined 2017-03-30 11:49:02 +02:00
Hugo Beauzée-Luyssen
123e190ee3 lua: PushCommand: Check for allocation failure 2017-03-30 11:49:02 +02:00
Hugo Beauzée-Luyssen
ce74108099 lua: PushCommand: Reduce locked scope 2017-03-30 11:49:02 +02:00
Hugo Beauzée-Luyssen
ab515823f4 lua: Factorize timeout detection 2017-03-30 11:49:02 +02:00
Hugo Beauzée-Luyssen
ce3fbfca7c lua: Fix deadlock when deactivating extension due to timeout.
lua_ExecuteFunctionVa is not meant to be called with the command_lock
held.
This partially reverts 7a94f2e6b2
Fix #17565
2017-03-30 11:49:02 +02:00
Rémi Denis-Courmont
7a94f2e6b2 lua: remove cargo-cultivated cancellation 2016-11-19 00:26:02 +02:00
Filip Roséen
31ea536898 lua: reserved identifier in function names
* renamed `__PushCommand` to `PushCommand__` since the former is a
    reserved identifier and therefor ill-formed according to the C
    ISO Standard.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2016-02-22 11:59:18 +01:00
Thomas Guillem
183d5cda47 dialog: use new API 2016-02-04 15:03:58 +01:00
Rémi Denis-Courmont
901fa0d6c7 Inline all remaining calls to vlc_cleanup_run()
The code size saving in vlc_cleanup_run() is marginal and premature
optimization. In practice, vlc_cleanup_run() makes the source code
harder to follow/read, confuses static analyzers and generates false
positive clobber warnings (on some OSes due to long jumps).

It did exercise some of the cleanup code paths though.
2015-07-08 21:14:02 +03:00
Rémi Denis-Courmont
5ae7b5e3c3 Lua: fix compilation with Lua 5.1.4 2014-04-02 23:05:54 +03:00
Rémi Denis-Courmont
fe30f8c0c3 Lua: add sockets to extensions (fixes #9495) 2014-03-24 19:55:14 +02:00
Rémi Duraffort
e8553f48b8 Fix wrong test (cid #1049311) 2013-07-22 19:34:35 +02:00
Rémi Denis-Courmont
e6ab18c187 Lua: extension: fix inverted cancellation logic
The cancellation-safe section was protected instead of the
cancellation-unsafe section.
2013-06-16 17:22:38 +03:00
Rémi Denis-Courmont
788d225674 Lua: extension: reindent 2013-06-16 17:18:04 +03:00
Rémi Denis-Courmont
7031f81cd8 Lua: extension: simplify command dequeuing 2013-06-16 17:16:22 +03:00
Rafaël Carré
5aaa94e4a9 lua: fix windows build
include config.h
2012-01-26 20:20:57 -05:00
Jean-Baptiste Kempf
61147a769e Move /modules/misc/lua/ to /modules/lua
Lua is an important part of VLC and abusing misc has gone a bit too far...
2011-02-20 18:29:21 +01:00