annotate osdep/macosx_finder_args.h @ 30795:1001c606f94c

Make emulated Win32 critical sections thread safe. Earlier, cs->locked was accessed outside the mutex to get around the problem that default pthread mutexes are not recursive (ie., you cannot do a double-lock from the same thread), causing a thread-safety problem, as both detected by Helgrind and showing up in some multithreaded codecs. The ideal solution here would be to simply use recursive pthread mutexes, but there were concerns about reduced debuggability and possibly portability. Thus, instead, rewrite the critical sections to be a simple lock count (with owner) protected by a regular mutex. Whenever a thread wants to enter the critical section and lock_count is not 0, it sleeps on a special event that tells it when the critical section is available.
author sesse
date Thu, 04 Mar 2010 15:57:08 +0000
parents 059153d06619
children c602283378f7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
30675
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
1 /*
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
2 * This file is part of MPlayer.
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
3 *
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
4 * MPlayer is free software; you can redistribute it and/or modify
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
5 * it under the terms of the GNU General Public License as published by
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
7 * (at your option) any later version.
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
8 *
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
9 * MPlayer is distributed in the hope that it will be useful,
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
12 * GNU General Public License for more details.
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
13 *
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
14 * You should have received a copy of the GNU General Public License along
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
17 */
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
18
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
19 #ifndef MPLAYER_MACOSX_FINDER_ARGS_H
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
20 #define MPLAYER_MACOSX_FINDER_ARGS_H
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
21
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
22 #include "playtree.h"
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
23
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
24 play_tree_t *macosx_finder_args(m_config_t *config, int argc, char **argv);
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
25
059153d06619 Add header for macosx_finder_args() instead of forward declaring it.
diego
parents:
diff changeset
26 #endif /* MPLAYER_MACOSX_FINDER_ARGS_H */