Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
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
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Balaji Kolla
openairinterface5G
Commits
d47e3074
Commit
d47e3074
authored
8 years ago
by
Cédric Roux
Browse files
Options
Downloads
Patches
Plain Diff
rename T_cache to T_local_cache in T/local_tracer.c
needed because of the following commit
parent
6a809e84
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
common/utils/T/local_tracer.c
+10
-10
10 additions, 10 deletions
common/utils/T/local_tracer.c
with
10 additions
and
10 deletions
common/utils/T/local_tracer.c
+
10
−
10
View file @
d47e3074
...
...
@@ -14,7 +14,7 @@
#include
"T_defs.h"
#include
"T_IDs.h"
static
T_cache_t
*
T_cache
;
static
T_cache_t
*
T_
local_
cache
;
static
int
T_busylist_head
;
typedef
struct
databuf
{
...
...
@@ -287,7 +287,7 @@ static void forward(void *_forwarder, char *buf, int size)
static
void
wait_message
(
void
)
{
while
(
T_cache
[
T_busylist_head
].
busy
==
0
)
usleep
(
1000
);
while
(
T_
local_
cache
[
T_busylist_head
].
busy
==
0
)
usleep
(
1000
);
}
static
void
init_shm
(
void
)
...
...
@@ -297,17 +297,17 @@ static void init_shm(void)
if
(
s
==
-
1
)
{
perror
(
T_SHM_FILENAME
);
abort
();
}
if
(
ftruncate
(
s
,
T_CACHE_SIZE
*
sizeof
(
T_cache_t
)))
{
perror
(
T_SHM_FILENAME
);
abort
();
}
T_cache
=
mmap
(
NULL
,
T_CACHE_SIZE
*
sizeof
(
T_cache_t
),
PROT_READ
|
PROT_WRITE
,
MAP_SHARED
,
s
,
0
);
if
(
T_cache
==
NULL
)
T_
local_
cache
=
mmap
(
NULL
,
T_CACHE_SIZE
*
sizeof
(
T_cache_t
),
PROT_READ
|
PROT_WRITE
,
MAP_SHARED
,
s
,
0
);
if
(
T_
local_
cache
==
NULL
)
{
perror
(
T_SHM_FILENAME
);
abort
();
}
close
(
s
);
/* let's garbage the memory to catch some potential problems
* (think multiprocessor sync issues, barriers, etc.)
*/
memset
(
T_cache
,
0x55
,
T_CACHE_SIZE
*
sizeof
(
T_cache_t
));
for
(
i
=
0
;
i
<
T_CACHE_SIZE
;
i
++
)
T_cache
[
i
].
busy
=
0
;
memset
(
T_
local_
cache
,
0x55
,
T_CACHE_SIZE
*
sizeof
(
T_cache_t
));
for
(
i
=
0
;
i
<
T_CACHE_SIZE
;
i
++
)
T_
local_
cache
[
i
].
busy
=
0
;
}
void
T_local_tracer_main
(
int
remote_port
,
int
wait_for_tracer
,
...
...
@@ -335,9 +335,9 @@ void T_local_tracer_main(int remote_port, int wait_for_tracer,
while
(
1
)
{
wait_message
();
__sync_synchronize
();
forward
(
f
,
T_cache
[
T_busylist_head
].
buffer
,
T_cache
[
T_busylist_head
].
length
);
T_cache
[
T_busylist_head
].
busy
=
0
;
forward
(
f
,
T_
local_
cache
[
T_busylist_head
].
buffer
,
T_
local_
cache
[
T_busylist_head
].
length
);
T_
local_
cache
[
T_busylist_head
].
busy
=
0
;
T_busylist_head
++
;
T_busylist_head
&=
T_CACHE_SIZE
-
1
;
}
...
...
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