[vlc-devel] [PATCH 2/2] thread: remove redundant darwin thread code

Rémi Denis-Courmont remi at remlab.net
Sun Feb 23 17:43:46 CET 2020


Le lauantaina 22. helmikuuta 2020, 15.41.17 EET Marvin Scholz a écrit :
> > And that's the whole point of keeping the MacOS code separate.
> 
> Sure but thats just for the clock related code, would you oppose
> the idea to split that into a different file like thread_clock.c
> or so and just copy that for darwin?

That's one way to put it but "just (...) the clock related code" really means 
the current time, sleep functions and *also* the timed-wait (condition 
variable earlier, and atomic variables now). And then it effectively indirectly 
pulls the whole thread synchronization code. Really, the clock code would not 
be with the thread code otherwise.

Basically, what's left is the thread management proper and TLS. So yeah, it's 
possible to split them: move the tick functions to wait.c and share what's 
then left of thread.c.

-- 
Rémi Denis-Courmont
http://www.remlab.net/





More information about the vlc-devel mailing list