Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
figures
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
poquet
millian
figures
Commits
a224feff
Commit
a224feff
authored
1 year ago
by
Millian Poquet
Browse files
Options
Downloads
Patches
Plain Diff
theoretical vs POSIX sem/mutex
parent
22feeaa5
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fig/sem-to-c-api/mpoquet.tmTheme
+374
-0
374 additions, 0 deletions
fig/sem-to-c-api/mpoquet.tmTheme
fig/sem-to-c-api/sem-to-c-api.typ
+74
-0
74 additions, 0 deletions
fig/sem-to-c-api/sem-to-c-api.typ
with
448 additions
and
0 deletions
fig/sem-to-c-api/mpoquet.tmTheme
0 → 100644
+
374
−
0
View file @
a224feff
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<dict>
<key>
author
</key>
<string>
Ankur Gupta
</string>
<key>
name
</key>
<string>
GitHub Clean White
</string>
<key>
settings
</key>
<array>
<dict>
<key>
settings
</key>
<dict>
<key>
background
</key>
<string>
#FFFFFF
</string>
<key>
caret
</key>
<string>
#000000
</string>
<key>
foreground
</key>
<string>
#000000
</string>
<key>
invisibles
</key>
<string>
#B3B3B3F4
</string>
<key>
lineHighlight
</key>
<string>
#0000001A
</string>
<key>
selection
</key>
<string>
#BAD6FD
</string>
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
String
</string>
<key>
scope
</key>
<string>
string
</string>
<key>
settings
</key>
<dict>
<key>
foreground
</key>
<string>
#C41A16
</string>
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
Number
</string>
<key>
scope
</key>
<string>
constant.numeric
</string>
<key>
settings
</key>
<dict>
<key>
foreground
</key>
<string>
#0086B3
</string>
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
Keyword
</string>
<key>
scope
</key>
<string>
keyword
</string>
<key>
settings
</key>
<dict>
<key>
foreground
</key>
<string>
#A71D5D
</string>
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
Operator
</string>
<key>
scope
</key>
<string>
keyword.operator
</string>
<key>
settings
</key>
<dict>
<key>
foreground
</key>
<string>
#000000
</string>
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
Built-in constant
</string>
<key>
scope
</key>
<string>
constant.language
</string>
<key>
settings
</key>
<dict>
<key>
foreground
</key>
<string>
#0086B3
</string>
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
Exception
</string>
<key>
scope
</key>
<string>
support.class.exception
</string>
<key>
settings
</key>
<dict>
<key>
foreground
</key>
<string>
#990000
</string>
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
Function name
</string>
<key>
scope
</key>
<string>
entity.name.function
</string>
<key>
settings
</key>
<dict>
<key>
foreground
</key>
<string>
#000000
</string>
<!-- <key>fontStyle</key>
<string>italic</string> -->
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
Type name
</string>
<key>
scope
</key>
<string>
entity.name.type
</string>
<key>
settings
</key>
<dict>
<key>
fontStyle
</key>
<string>
bold underline
</string>
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
Arguments
</string>
<key>
scope
</key>
<string>
variable.parameter
</string>
<key>
settings
</key>
<dict>
<key>
fontStyle
</key>
<string>
italic
</string>
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
Comment
</string>
<key>
scope
</key>
<string>
comment
</string>
<key>
settings
</key>
<dict>
<!-- <key>fontStyle</key>
<string>italic</string> -->
<key>
foreground
</key>
<string>
#707070
</string>
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
Invalid
</string>
<key>
scope
</key>
<string>
invalid
</string>
<key>
settings
</key>
<dict>
<!-- <key>background</key>
<string>#E71A114D</string> -->
<key>
foreground
</key>
<string>
#FF0000
</string>
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
Trailing whitespace
</string>
<key>
scope
</key>
<string>
invalid.deprecated.trailing-whitespace
</string>
<key>
settings
</key>
<dict>
<key>
background
</key>
<string>
#E71A1100
</string>
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
Embedded source
</string>
<key>
scope
</key>
<string>
text source
</string>
<key>
settings
</key>
<dict>
<key>
background
</key>
<string>
#FAFAFAFC
</string>
<key>
foreground
</key>
<string>
#000000
</string>
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
Tag
</string>
<key>
scope
</key>
<string>
meta.tag, declaration.tag
</string>
<key>
settings
</key>
<dict>
<key>
foreground
</key>
<string>
#AA0D91
</string>
</dict>
</dict>
<!-- <dict>
<key>name</key>
<string>Constant</string>
<key>scope</key>
<string>constant, support.constant</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#000000</string>
</dict>
</dict> -->
<dict>
<key>
name
</key>
<string>
Support
</string>
<key>
scope
</key>
<string>
support
</string>
<key>
settings
</key>
<dict>
<key>
fontStyle
</key>
<string>
bold
</string>
<key>
foreground
</key>
<string>
#000000
</string>
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
Storage
</string>
<key>
scope
</key>
<string>
storage
</string>
<key>
settings
</key>
<dict>
<!-- <key>fontStyle</key>
<string>bold</string> -->
<key>
foreground
</key>
<string>
#AA0D91
</string>
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
Section name
</string>
<key>
scope
</key>
<string>
entity.name.section
</string>
<key>
settings
</key>
<dict>
<key>
fontStyle
</key>
<string>
bold underline
</string>
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
Frame title
</string>
<key>
scope
</key>
<string>
entity.name.function.frame
</string>
<key>
settings
</key>
<dict>
<key>
fontStyle
</key>
<string>
bold
</string>
<key>
foreground
</key>
<string>
#000000
</string>
<!-- <string>#881280</string> -->
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
XML Declaration
</string>
<key>
scope
</key>
<string>
meta.tag.preprocessor.xml
</string>
<key>
settings
</key>
<dict>
<key>
foreground
</key>
<string>
#333333
</string>
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
html attribute
</string>
<key>
scope
</key>
<string>
entity.other.attribute-name
</string>
<key>
settings
</key>
<dict>
<key>
fontStyle
</key>
<string>
italic
</string>
<key>
foreground
</key>
<!-- <string>#3366CC</string> -->
<string>
#0A8585
</string>
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
html tag punctuation
</string>
<key>
scope
</key>
<string>
entity.name.tag
</string>
<key>
settings
</key>
<dict>
<key>
foreground
</key>
<string>
#121289
</string>
<!-- <key>fontStyle</key>
<string>bold</string> -->
</dict>
</dict>
<!-- Adding stuff for diff. This works in ST3 -->
<dict>
<key>
name
</key>
<string>
diff header from
</string>
<key>
scope
</key>
<string>
meta.diff.header.from-file
</string>
<key>
settings
</key>
<dict>
<key>
background
</key>
<string>
#FFDDDD
</string>
<key>
fontStyle
</key>
<string></string>
<key>
foreground
</key>
<string>
#000000
</string>
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
diff header to
</string>
<key>
scope
</key>
<string>
meta.diff.header.to-file
</string>
<key>
settings
</key>
<dict>
<key>
background
</key>
<string>
#DDFFDD
</string>
<key>
fontStyle
</key>
<string></string>
<key>
foreground
</key>
<string>
#000000
</string>
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
diff inserted
</string>
<key>
scope
</key>
<string>
markup.inserted.diff
</string>
<key>
settings
</key>
<dict>
<key>
background
</key>
<string>
#DDFFDD
</string>
<key>
fontStyle
</key>
<string></string>
</dict>
</dict>
<dict>
<key>
name
</key>
<string>
diff deleted
</string>
<key>
scope
</key>
<string>
markup.deleted.diff
</string>
<key>
settings
</key>
<dict>
<key>
background
</key>
<string>
#FFDDDD
</string>
<key>
fontStyle
</key>
<string></string>
<key>
foreground
</key>
<string>
#000000
</string>
</dict>
</dict>
<!-- BracketHighlighter colors -->
<dict>
<key>
name
</key>
<string>
BH Color
</string>
<key>
scope
</key>
<string>
brackethighlighter.default
</string>
<key>
settings
</key>
<dict>
<key>
foreground
</key>
<string>
#FF992244
</string>
<key>
fontStyle
</key>
<string>
italic
</string>
</dict>
</dict>
</array>
<key>
uuid
</key>
<string>
26786979-843B-4FE2-BCB6-4FCEC6F8FB58
</string>
<key>
colorSpaceName
</key>
<string>
sRGB
</string>
<key>
semanticClass
</key>
<string>
theme.light.git_hub_clean_white
</string>
<key>
comment
</key>
<string>
v1.0 Feb 1, 2015
Made to look as close to GitHub as possible.
</string>
</dict>
</plist>
This diff is collapsed.
Click to expand it.
fig/sem-to-c-api/sem-to-c-api.typ
0 → 100644
+
74
−
0
View file @
a224feff
#
import
"
@preview/cetz:0.2.2
"
#
let
pagescale
=
0.95
#
set
page
(
width
:
16
cm
*
pagescale
,
height
:
9
cm
*
pagescale
,
margin
:
5
mm
)
#
set
raw
(
theme
:
"
mpoquet.tmTheme
"
)
#
show
math
.
equation
:
block
.
with
(
fill
:
white
,
inset
:
1
pt
)
#
let
il
=
-4
mm
#
cetz
.
canvas
(
length
:
3
cm
,
{
import
cetz
.
draw
:
*
let
theox
=
0
mm
let
implemx
=
4.5
cm
let
mutexy
=
0
cm
let
semy
=
-5
cm
let
y
=
mutexy
let
x
=
implemx
let
x
-
border
=
2
mm
let
rect
-
width
=
9.25
cm
let
rect
-
height
=
2.75
cm
rect
((
x
-
x
-
border
,
y
),
(
x
+
rect
-
width
+
x
-
border
,
y
-
rect
-
height
),
stroke
:
.1
mm
,
fill
:
none
)
content
((
x
+
rect
-
width
/
2
,
y
),
anchor
:
"
center
"
,
[
#
box
(
fill
:
luma
(
230
),
inset
:
(
x
:
2
mm
,
y
:
1.25
mm
),
stroke
:
.2
mm
,
[
`
mutex
`
API
(
C
,
POSIX
threads
)
]
)
]
)
let
y
=
y
+
il
/
4
content
((
x
,
y
+
il
*
1
),
anchor
:
"
west
"
,
raw
(
"
#include <pthread.h>
"
,
lang
:
"
c
"
))
content
((
x
,
y
+
il
*
2
),
anchor
:
"
west
"
,
raw
(
"
int pthread_mutex_init(...);
"
,
lang
:
"
c
"
),
name
:
"
pthread-mutex-init
"
)
content
((
x
,
y
+
il
*
3
),
anchor
:
"
west
"
,
raw
(
"
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
"
,
lang
:
"
c
"
),
name
:
"
pthread-mutex-init-macro
"
)
content
((
x
,
y
+
il
*
4
),
anchor
:
"
west
"
,
raw
(
"
int pthread_mutex_destroy(...);
"
,
lang
:
"
c
"
))
content
((
x
,
y
+
il
*
5
),
anchor
:
"
west
"
,
raw
(
"
int pthread_mutex_lock(...);
"
,
lang
:
"
c
"
),
name
:
"
pthread-mutex-lock
"
)
content
((
x
,
y
+
il
*
6
),
anchor
:
"
west
"
,
raw
(
"
int pthread_mutex_unlock(...);
"
,
lang
:
"
c
"
),
name
:
"
pthread-mutex-unlock
"
)
let
x
=
theox
let
y
=
mutexy
//
content
((
x
,
y
),
anchor
:
"
west
"
,
[
S
é
maphore
th
é
orique
]
)
let
y
=
y
+
il
/
4
content
((
x
,
y
+
il
*
2
),
anchor
:
"
west
"
,
[
`
init
(
1
)
`
]
,
name
:
"
theo-init
"
)
content
((
x
,
y
+
il
*
5
),
anchor
:
"
west
"
,
[
`
P
()
`
]
,
name
:
"
theo-p
"
)
content
((
x
,
y
+
il
*
6
),
anchor
:
"
west
"
,
[
`
V
()
`
]
,
name
:
"
theo-v
"
)
line
(
"
theo-init.east
"
,
(
4.475
cm
,
y
+
il
*
2
),
mark
:
none
,
padding
:
1
cm
,
stroke
:
.3
mm
)
line
((
3
cm
,
y
+
il
*
2
),
(
3
cm
,
y
+
il
*
3
),
(
4.475
cm
,
y
+
il
*
3
),
mark
:
none
,
padding
:
1
cm
,
stroke
:
.3
mm
)
line
(
"
theo-p.east
"
,
"
pthread-mutex-lock.west
"
,
mark
:
none
,
padding
:
1
cm
,
stroke
:
.3
mm
)
line
(
"
theo-v.east
"
,
"
pthread-mutex-unlock.west
"
,
mark
:
none
,
padding
:
1
cm
,
stroke
:
.3
mm
)
let
x
=
implemx
let
y
=
semy
let
rect
-
width
=
9.25
cm
let
rect
-
height
=
2.4
cm
rect
((
x
-
x
-
border
,
y
),
(
x
+
rect
-
width
+
x
-
border
,
y
-
rect
-
height
),
stroke
:
.1
mm
,
fill
:
none
)
content
((
x
+
rect
-
width
/
2
,
y
),
anchor
:
"
center
"
,
[
#
box
(
fill
:
luma
(
230
),
inset
:
(
x
:
2
mm
,
y
:
1.25
mm
),
stroke
:
.2
mm
,
[
`
sem
`
API
(
C
,
POSIX
threads
)
]
)
]
)
let
y
=
y
+
il
/
4
content
((
x
,
y
+
il
*
1
),
anchor
:
"
west
"
,
raw
(
"
#include <semaphore.h>
"
,
lang
:
"
c
"
))
content
((
x
,
y
+
il
*
2
),
anchor
:
"
west
"
,
raw
(
"
int sem_init(..., unsigned int n);
"
,
lang
:
"
c
"
),
name
:
"
pthread-sem-init
"
)
content
((
x
,
y
+
il
*
3
),
anchor
:
"
west
"
,
raw
(
"
int sem_destroy(...);
"
,
lang
:
"
c
"
))
content
((
x
,
y
+
il
*
4
),
anchor
:
"
west
"
,
raw
(
"
int sem_wait(...);
"
,
lang
:
"
c
"
),
name
:
"
pthread-sem-wait
"
)
content
((
x
,
y
+
il
*
5
),
anchor
:
"
west
"
,
raw
(
"
int sem_post(...);
"
,
lang
:
"
c
"
),
name
:
"
pthread-sem-post
"
)
let
x
=
theox
let
y
=
semy
//
content
((
x
,
y
),
anchor
:
"
west
"
,
[
S
é
maphore
th
é
orique
]
)
let
y
=
y
+
il
/
4
content
((
x
,
y
+
il
*
2
),
anchor
:
"
west
"
,
[
`
init
(
n
)
`
]
,
name
:
"
theo-init
"
)
content
((
x
,
y
+
il
*
4
),
anchor
:
"
west
"
,
[
`
P
()
`
]
,
name
:
"
theo-p
"
)
content
((
x
,
y
+
il
*
5
),
anchor
:
"
west
"
,
[
`
V
()
`
]
,
name
:
"
theo-v
"
)
line
(
"
theo-init.east
"
,
(
4.475
cm
,
y
+
il
*
2
),
mark
:
none
,
padding
:
1
cm
,
stroke
:
.3
mm
)
line
(
"
theo-p.east
"
,
"
pthread-sem-wait.west
"
,
mark
:
none
,
padding
:
1
cm
,
stroke
:
.3
mm
)
line
(
"
theo-v.east
"
,
"
pthread-sem-post.west
"
,
mark
:
none
,
padding
:
1
cm
,
stroke
:
.3
mm
)
}
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment