Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
argo
aml
Commits
ba0737b7
Commit
ba0737b7
authored
Jun 28, 2019
by
Swann Perarnau
Browse files
[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
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