File: ipcmutex.R

package info (click to toggle)
r-bioc-biocparallel 1.40.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,768 kB
  • sloc: cpp: 139; sh: 14; makefile: 8
file content (43 lines) | stat: -rw-r--r-- 629 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
## Utilities

ipcid <- function(id) {
    uuid <- cpp_ipc_uuid()
    if (!missing(id))
        uuid <- paste(as.character(id), uuid, sep="-")
    uuid
}

ipcremove <- function(id) {
    invisible(cpp_ipc_remove(id))
}

## Locks

ipclocked <- function(id)
    cpp_ipc_locked(id)

ipclock <- function(id) {
    cpp_ipc_lock(id)
}

ipctrylock <- function(id) {
    cpp_ipc_try_lock(id)
}

ipcunlock <- function(id) {
    cpp_ipc_unlock(id)
}

## Counters

ipcyield <- function(id) {
    cpp_ipc_yield(id)
}

ipcvalue <- function(id) {
    cpp_ipc_value(id)
}

ipcreset <- function(id, n = 1) {
    invisible(cpp_ipc_reset(id, n))
}