Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
PRRT
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
37
Issues
37
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LARN
PRRT
Commits
4f4ae662
Commit
4f4ae662
authored
Oct 09, 2017
by
Andreas Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add thread pinning to Python API.
parent
52fdeea0
Pipeline
#1342
passed with stages
in 1 minute and 12 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
0 deletions
+26
-0
prrt/cprrt.pxd
prrt/cprrt.pxd
+5
-0
prrt/proto/socket.c
prrt/proto/socket.c
+8
-0
prrt/proto/socket.h
prrt/proto/socket.h
+2
-0
prrt/prrt.pyx
prrt/prrt.pyx
+5
-0
prrt/py_defines.h
prrt/py_defines.h
+6
-0
No files found.
prrt/cprrt.pxd
View file @
4f4ae662
...
...
@@ -11,6 +11,9 @@ cdef extern from "pthread.h" nogil:
ctypedef
struct
pthread_cond_t
:
pass
cdef
extern
from
"py_defines.h"
:
pass
cdef
extern
from
"proto/vdmcode/block_code.h"
:
cdef
struct
prrtCoder
:
pass
...
...
@@ -120,6 +123,8 @@ cdef extern from "proto/socket.h":
int32_t
PrrtSocket_timedrecv
(
PrrtSocket
*
sock_ptr
,
void
*
buf_ptr
,
const
uint32_t
wait_time
)
nogil
bint
PrrtSocket_set_sock_opt
(
PrrtSocket
*
sock_ptr
,
const_char
*
name
,
const
uint32_t
value
)
uint32_t
PrrtSocket_get_sock_opt
(
PrrtSocket
*
sock_ptr
,
const_char
*
name
)
bint
PrrtSocket_uses_thread_pinning
(
PrrtSocket
*
socket
)
cdef
extern
from
"util/bptree.h"
:
ctypedef
struct
BPTreeNode
:
...
...
prrt/proto/socket.c
View file @
4f4ae662
...
...
@@ -427,3 +427,11 @@ bool PrrtSocket_cleanup(PrrtSocket *socket) {
}
return
true
;
}
bool
PrrtSocket_uses_thread_pinning
(
PrrtSocket
*
socket
)
{
#ifdef THREAD_PINNING
return
true
;
#else
return
false
;
#endif
}
prrt/proto/socket.h
View file @
4f4ae662
...
...
@@ -94,4 +94,6 @@ bool PrrtSocket_cleanup(PrrtSocket *socket);
bool
PrrtSocket_closing
(
PrrtSocket
*
socket
);
bool
PrrtSocket_uses_thread_pinning
(
PrrtSocket
*
socket
);
#endif // PRRT_SOCKET_H
prrt/prrt.pyx
View file @
4f4ae662
...
...
@@ -79,6 +79,11 @@ cdef class PrrtSocket:
self
.
isSender
=
isSender
property
thread_pinning
:
def
__get__
(
self
):
return
cprrt
.
PrrtSocket_uses_thread_pinning
(
self
.
_c_socket
)
property
target_delay
:
def
__get__
(
self
):
...
...
prrt/py_defines.h
0 → 100644
View file @
4f4ae662
#ifndef PRRT_PY_DEFINES_H
#define PRRT_PY_DEFINES_H
#define THREAD_PINNING
#endif //PRRT_PY_DEFINES_H
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