Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
16903a1b
Commit
16903a1b
authored
Sep 19, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use OSAtomic() as a fallback on Mac OS X.
parent
129582fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
po/Makefile.in.in
po/Makefile.in.in
+0
-2
src/libvlc.c
src/libvlc.c
+10
-0
No files found.
po/Makefile.in.in
View file @
16903a1b
...
...
@@ -166,8 +166,6 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
--msgid-bugs-address
=
"
$$
msgid_bugs_address"
\
;;
\
esac
sed
's/&/\&/'
$(DOMAIN)
.po
>
$(DOMAIN)
.po1
&&
\
mv
$(DOMAIN)
.po1
$(DOMAIN)
.po
;
test
!
-f
$(DOMAIN)
.po
||
{
\
if
test
-f
$(srcdir)
/
$(DOMAIN)
.pot
;
then
\
sed
-f
remove-potcdate.sed <
$(srcdir)
/
$(DOMAIN)
.pot
>
$(DOMAIN)
.1po
&&
\
...
...
src/libvlc.c
View file @
16903a1b
...
...
@@ -98,6 +98,10 @@
#include <vlc_vlm.h>
#ifdef __APPLE__
# include <libkern/OSAtomic.h>
#endif
#include <assert.h>
/*****************************************************************************
...
...
@@ -127,6 +131,8 @@ void *vlc_gc_init (gc_object_t *p_gc, void (*pf_destruct) (gc_object_t *))
p_gc
->
refs
=
1
;
#ifdef USE_SYNC
__sync_synchronize
();
#elif defined(__APPLE__)
OSMemoryBarrier
();
#else
/* Nobody else can possibly lock the spin - it's there as a barrier */
vlc_spin_init
(
&
p_gc
->
spin
);
...
...
@@ -148,6 +154,8 @@ void *vlc_hold (gc_object_t * p_gc)
#ifdef USE_SYNC
refs
=
__sync_fetch_and_add
(
&
p_gc
->
refs
,
1
);
#elif defined(__APPLE__)
OSAtomicIncrement32Barrier
((
int
*
)
&
p_gc
->
refs
);
#else
vlc_spin_lock
(
&
p_gc
->
spin
);
refs
=
p_gc
->
refs
++
;
...
...
@@ -169,6 +177,8 @@ void vlc_release (gc_object_t *p_gc)
#ifdef USE_SYNC
refs
=
__sync_fetch_and_sub
(
&
p_gc
->
refs
,
1
);
#elif defined(__APPLE__)
OSAtomicDecrement32Barrier
((
int
*
)
&
p_gc
->
refs
);
#else
vlc_spin_lock
(
&
p_gc
->
spin
);
refs
=
p_gc
->
refs
--
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment