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
mpim-sw
libcdi
Commits
9f57fc8a
Commit
9f57fc8a
authored
Jul 25, 2012
by
Thomas Jahns
🤸
Browse files
fixup: Replace book-keeping array with simple count.
parent
5f8b743f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/pio_posixasynch.c
View file @
9f57fc8a
...
@@ -44,8 +44,7 @@ typedef struct
...
@@ -44,8 +44,7 @@ typedef struct
int
currOpIndex
;
int
currOpIndex
;
int
nextOpIndex
;
int
nextOpIndex
;
int
prefIndex
;
int
prefIndex
;
bool
finished
;
int
activeCollectors
;
bool
*
nfinished
;
int
handle
,
fileID
;
int
handle
,
fileID
;
char
name
[];
char
name
[];
}
bFiledataPA
;
}
bFiledataPA
;
...
@@ -91,11 +90,7 @@ initBFiledataPA(char *filename, size_t bs, int nc)
...
@@ -91,11 +90,7 @@ initBFiledataPA(char *filename, size_t bs, int nc)
bfd
->
nextOpIndex
=
0
;
bfd
->
nextOpIndex
=
0
;
bfd
->
prefIndex
=
0
;
bfd
->
prefIndex
=
0
;
bfd
->
offset
=
0
;
bfd
->
offset
=
0
;
bfd
->
finished
=
false
;
bfd
->
activeCollectors
=
nc
;
bfd
->
nfinished
=
xmalloc
(
nc
*
sizeof
(
bfd
->
nfinished
[
0
]
));
for
(
i
=
0
;
i
<
nc
;
i
++
)
bfd
->
nfinished
[
i
]
=
false
;
xdebug
(
"filename=%s, opened file, return"
,
bfd
->
name
);
xdebug
(
"filename=%s, opened file, return"
,
bfd
->
name
);
...
@@ -153,8 +148,7 @@ destroyBFiledataPA ( void *v )
...
@@ -153,8 +148,7 @@ destroyBFiledataPA ( void *v )
dbuffer_cleanup
(
&
(
bfd
->
fb
));
dbuffer_cleanup
(
&
(
bfd
->
fb
));
free
(
bfd
->
nfinished
);
free
(
bfd
->
ctrlBlks
);
free
(
bfd
->
ctrlBlks
);
free
(
bfd
);
free
(
bfd
);
xdebug
(
"%s"
,
"closed file and cleaned up, return"
);
xdebug
(
"%s"
,
"closed file and cleaned up, return"
);
...
@@ -370,17 +364,7 @@ void pioWriterAIO(void)
...
@@ -370,17 +364,7 @@ void pioWriterAIO(void)
writePA
(
bfd
,
amount
);
writePA
(
bfd
,
amount
);
bfd
->
nfinished
[
source
]
=
true
;
if
(
!
--
(
bfd
->
activeCollectors
))
bfd
->
finished
=
true
;
for
(
i
=
0
;
i
<
nProcsCollNode
;
i
++
)
if
(
!
(
bfd
->
nfinished
[
i
]
))
{
bfd
->
finished
=
false
;
break
;
}
if
(
bfd
->
finished
)
{
{
xdebug
(
"all are finished with file %d, delete node"
,
rtag
.
id
);
xdebug
(
"all are finished with file %d, delete node"
,
rtag
.
id
);
listSetRemove
(
bibBFiledataPA
,
fileIDTest
,
listSetRemove
(
bibBFiledataPA
,
fileIDTest
,
...
...
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