Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
96dfe043
Commit
96dfe043
authored
Jul 25, 2012
by
Thomas Jahns
🤸
Browse files
Replace book-keeping array with simple count.
parent
3afe6426
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/pio_posixnonb.c
View file @
96dfe043
...
...
@@ -25,8 +25,7 @@ typedef struct
struct
dBuffer
*
fb
;
FILE
*
fp
;
int
fileID
;
bool
finished
;
bool
*
nfinished
;
int
activeCollectors
;
char
name
[];
}
bFiledataP
;
...
...
@@ -56,11 +55,7 @@ initBFiledataP(char *filename, size_t bs, int nc, int fileID)
ftruncate
(
fd
,
(
off_t
)
0
);
dbuffer_init
(
&
(
bfp
->
fb
),
(
size_t
)(
bfp
->
size
));
bfp
->
finished
=
false
;
bfp
->
nfinished
=
xmalloc
(
nc
*
sizeof
(
bfp
->
nfinished
[
0
]
));
for
(
i
=
0
;
i
<
nc
;
i
++
)
bfp
->
nfinished
[
i
]
=
false
;
bfp
->
activeCollectors
=
nc
;
bfp
->
fileID
=
fileID
;
...
...
@@ -87,8 +82,7 @@ destroyBFiledataP(void *v)
dbuffer_cleanup
(
&
(
bfp
->
fb
));
free
(
bfp
->
nfinished
);
free
(
bfp
);
free
(
bfp
);
xdebug
(
"%s"
,
"cleaned up, return"
);
...
...
@@ -255,19 +249,7 @@ pioWriterStdIO(void)
writeP
(
bfd
,
amount
);
bfd
->
nfinished
[
source
]
=
true
;
bfd
->
finished
=
true
;
for
(
i
=
0
;
i
<
nProcsCollNode
;
i
++
)
{
if
(
bfd
->
nfinished
[
i
]
==
false
)
{
bfd
->
finished
=
false
;
break
;
}
}
if
(
bfd
->
finished
)
if
(
!
--
(
bfd
->
activeCollectors
))
{
xdebug
(
"all are finished with file %d, delete node"
,
rtag
.
id
);
queueDelNode
(
bibBFiledataP
,
fileIDTest
,
...
...
Write
Preview
Supports
Markdown
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