Dokumentation der "valid lock sequence" in PLUGINS.html

  • Hallo Klaus,


    könntet Du die "valid lock sequence" in PLUGINS.html dokumentieren?

    Also welche locks in welcher Reihenfolge angefordert werden dürfen?

    Oder is das bereits an einer anderen Stelle dukumentiert, außer in der HISTORY?


    ~ Markus

    Client1: ASUS P5QC, Dual Core 3G, Cine S2, Ext. Board von TBE, Xubuntu 20.04, VDR 2.6x

    Client2: RPI3

    Server: RPI4, Sundtek SkyTV Dual 2x

  • Hallo,


    Ich schreibe die Duku mal hier:


    See tools.h, class "cListBase", method "bool Lock(cStateKey &StateKey, bool Write = false, int TimeoutMs = 0)" for documentation.


    Additional notes: The convenience macros like

    LOCK_TIMERS_READ

    ...


    have no timeout, they wait forever. Still, they might return a zero value pointer.

    For the *_WRITE macros, this will happen if the same *_WRITE is used in the same block.


    For single objects retrieved from global lists, like cEvent event:

    You can continue to use such objects after the lock is released. But:

    - The object might be deleted after LIST_GARBAGE_COLLECTOR_TIMEOUT (5) seconds. If you access the object after this time, the result is undefined and vdr might crash. And remember, linux is not a real time system ...

    - The object might be removed from the global list, directly after you release the lock


    ~ Markus

    Client1: ASUS P5QC, Dual Core 3G, Cine S2, Ext. Board von TBE, Xubuntu 20.04, VDR 2.6x

    Client2: RPI3

    Server: RPI4, Sundtek SkyTV Dual 2x

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!