Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
aml
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
27
Issues
27
List
Boards
Labels
Milestones
Merge Requests
6
Merge Requests
6
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
argo
aml
Commits
ba0737b7
Commit
ba0737b7
authored
Jun 28, 2019
by
Swann Perarnau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] various dma/area fixes after -Wall
Less than perfect types for the most part, plus a few unused variables.
parent
fddea6ed
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
+10
-9
include/aml/dma/linux-par.h
include/aml/dma/linux-par.h
+2
-2
src/area/linux.c
src/area/linux.c
+2
-1
src/dma/dma_linux_par.c
src/dma/dma_linux_par.c
+6
-6
No files found.
include/aml/dma/linux-par.h
View file @
ba0737b7
...
...
@@ -33,7 +33,7 @@ struct aml_dma_linux_par_thread_data {
* A logical identifier of the thread in charge for
* the request progress.
**/
in
t
tid
;
size_
t
tid
;
/** The actual thread in charge for the request progress**/
pthread_t
thread
;
/** The dma containing sequential operations **/
...
...
@@ -70,7 +70,7 @@ struct aml_dma_linux_par_data {
struct
aml_dma_linux_par_ops
{
void
*
(
*
do_thread
)(
void
*
thread_data
);
int
(
*
do_copy
)(
struct
aml_dma_linux_par_data
*
data
,
struct
aml_dma_request_linux_par
*
request
,
in
t
tid
);
struct
aml_dma_request_linux_par
*
request
,
size_
t
tid
);
};
/**
...
...
src/area/linux.c
View file @
ba0737b7
...
...
@@ -47,6 +47,8 @@ aml_area_linux_check_binding(struct aml_area_linux_data *area_data,
{
int
err
,
mode
,
i
;
struct
bitmask
*
nodeset
;
// unused parameter
(
void
)
size
;
nodeset
=
numa_allocate_nodemask
();
if
(
nodeset
==
NULL
)
...
...
@@ -209,7 +211,6 @@ int aml_area_linux_init(struct aml_area *area, const int mmap_flags,
const
int
binding_flags
)
{
struct
aml_area_linux_data
*
data
;
int
err
;
if
(
area
==
NULL
)
return
-
AML_EINVAL
;
...
...
src/dma/dma_linux_par.c
View file @
ba0737b7
...
...
@@ -66,7 +66,7 @@ void *aml_dma_linux_par_do_thread(void *arg)
}
int
aml_dma_linux_par_do_copy
(
struct
aml_dma_linux_par_data
*
dma
,
struct
aml_dma_request_linux_par
*
req
,
in
t
tid
)
struct
aml_dma_request_linux_par
*
req
,
size_
t
tid
)
{
assert
(
dma
!=
NULL
);
assert
(
req
!=
NULL
);
...
...
@@ -125,7 +125,7 @@ int aml_dma_linux_par_create_request(struct aml_dma_data *d,
}
pthread_mutex_unlock
(
&
dma
->
data
.
lock
);
for
(
in
t
i
=
0
;
i
<
dma
->
data
.
nbthreads
;
i
++
)
{
for
(
size_
t
i
=
0
;
i
<
dma
->
data
.
nbthreads
;
i
++
)
{
struct
aml_dma_linux_par_thread_data
*
rd
=
&
req
->
thread_data
[
i
];
rd
->
req
=
req
;
...
...
@@ -149,7 +149,7 @@ int aml_dma_linux_par_destroy_request(struct aml_dma_data *d,
(
struct
aml_dma_request_linux_par
*
)
r
;
/* we cancel and join, instead of killing, for a cleaner result */
for
(
in
t
i
=
0
;
i
<
dma
->
data
.
nbthreads
;
i
++
)
{
for
(
size_
t
i
=
0
;
i
<
dma
->
data
.
nbthreads
;
i
++
)
{
pthread_cancel
(
req
->
thread_data
[
i
].
thread
);
pthread_join
(
req
->
thread_data
[
i
].
thread
,
NULL
);
}
...
...
@@ -172,7 +172,7 @@ int aml_dma_linux_par_wait_request(struct aml_dma_data *d,
struct
aml_dma_request_linux_par
*
req
=
(
struct
aml_dma_request_linux_par
*
)
r
;
for
(
in
t
i
=
0
;
i
<
dma
->
data
.
nbthreads
;
i
++
)
for
(
size_
t
i
=
0
;
i
<
dma
->
data
.
nbthreads
;
i
++
)
pthread_join
(
req
->
thread_data
[
i
].
thread
,
NULL
);
/* destroy a completed request */
...
...
@@ -244,7 +244,7 @@ int aml_dma_linux_par_init(struct aml_dma *d, size_t nbreqs,
sizeof
(
struct
aml_dma_request_linux_par
),
offsetof
(
struct
aml_dma_request_linux_par
,
type
),
AML_DMA_REQUEST_TYPE_INVALID
);
for
(
in
t
i
=
0
;
i
<
nbreqs
;
i
++
)
{
for
(
size_
t
i
=
0
;
i
<
nbreqs
;
i
++
)
{
struct
aml_dma_request_linux_par
*
req
=
aml_vector_get
(
&
dma
->
data
.
requests
,
i
);
...
...
@@ -262,7 +262,7 @@ void aml_dma_linux_par_fini(struct aml_dma *d)
if
(
d
==
NULL
||
d
->
data
==
NULL
)
return
;
dma
=
(
struct
aml_dma_linux_par
*
)
d
->
data
;
for
(
in
t
i
=
0
;
i
<
aml_vector_size
(
&
dma
->
data
.
requests
);
i
++
)
{
for
(
size_
t
i
=
0
;
i
<
aml_vector_size
(
&
dma
->
data
.
requests
);
i
++
)
{
struct
aml_dma_request_linux_par
*
req
=
aml_vector_get
(
&
dma
->
data
.
requests
,
i
);
...
...
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