Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
ZhouShuya
OpenXG-RAN
Commits
91f098ee
Commit
91f098ee
authored
Jan 22, 2018
by
laurent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add controls, code cleanup
parent
3bd7cd2d
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1706 additions
and
1652 deletions
+1706
-1652
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+1605
-1583
targets/tcri/thread-pool.c
targets/tcri/thread-pool.c
+87
-69
targets/tcri/thread-pool.h
targets/tcri/thread-pool.h
+14
-0
No files found.
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
91f098ee
This source diff could not be displayed because it is too large. You can
view the blob
instead.
targets/tcri/thread-pool.c
View file @
91f098ee
This diff is collapsed.
Click to expand it.
targets/tcri/thread-pool.h
View file @
91f098ee
#ifndef THREAD_POOL_H
#ifndef THREAD_POOL_H
#define THREAD_POOL_H
#define THREAD_POOL_H
#include <stdbool.h>
#include <stdbool.h>
#include <sys/syscall.h>
#include <openair2/COMMON/platform_types.h>
#include <openair2/COMMON/platform_types.h>
enum
request_t
{
enum
request_t
{
...
@@ -48,6 +49,7 @@ typedef struct thread_pool {
...
@@ -48,6 +49,7 @@ typedef struct thread_pool {
int
activated
;
int
activated
;
pthread_mutex_t
lockRequests
;
pthread_mutex_t
lockRequests
;
pthread_cond_t
notifRequest
;
pthread_cond_t
notifRequest
;
int
notifCount
;
pthread_mutex_t
lockReportDone
;
pthread_mutex_t
lockReportDone
;
pthread_cond_t
notifDone
;
pthread_cond_t
notifDone
;
request_t
*
oldestRequests
;
request_t
*
oldestRequests
;
...
@@ -62,6 +64,18 @@ typedef struct thread_pool {
...
@@ -62,6 +64,18 @@ typedef struct thread_pool {
struct
one_thread
*
allthreads
;
struct
one_thread
*
allthreads
;
}
tpool_t
;
}
tpool_t
;
#define mutexinit(mutex) AssertFatal(pthread_mutex_init(&mutex,NULL)==0,"");
#define condinit(signal) AssertFatal(pthread_cond_init(&signal,NULL)==0,"");
//#define mutexlock(mutex) printf("L:" #mutex __FILE__ ":%d, thread %d\n", __LINE__, syscall( SYS_gettid )); AssertFatal(pthread_mutex_lock(&mutex)==0,"");
//#define mutexunlock(mutex) printf("U:" #mutex __FILE__ ":%d, thread:%d\n", __LINE__, syscall( SYS_gettid )); AssertFatal(pthread_mutex_unlock(&mutex)==0,"");
#define mutexlock(mutex) AssertFatal(pthread_mutex_lock(&mutex)==0,"");
#define mutexunlock(mutex) AssertFatal(pthread_mutex_unlock(&mutex)==0,"");
#define condwait(condition, mutex) AssertFatal(pthread_cond_wait(&condition, &mutex)==0,"");
#define condbroadcast(signal) AssertFatal(pthread_cond_broadcast(&signal)==0,"");
#define condsignal(signal) AssertFatal(pthread_cond_broadcast(&signal)==0,"");
void
init_tpool
(
char
*
,
tpool_t
*
);
void
init_tpool
(
char
*
,
tpool_t
*
);
request_t
*
createRequest
(
enum
request_t
type
,
int
size
);
request_t
*
createRequest
(
enum
request_t
type
,
int
size
);
void
freeRequest
(
request_t
*
request
);
void
freeRequest
(
request_t
*
request
);
...
...
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