[Kst] branches/work/kst/1.6/kst/src/d2asc
Andrew Walker
arwalker at sumusltd.com
Tue Dec 11 01:53:27 CET 2007
SVN commit 747086 by arwalker:
BUG:153654 add necessary locks to avoid asserts
M +9 -5 d2asc.cpp
--- branches/work/kst/1.6/kst/src/d2asc/d2asc.cpp #747085:747086
@@ -56,10 +56,13 @@
fieldEntry field;
QValueList<fieldEntry> fieldList;
char *filename;
- bool do_ave = false, do_skip = false;
- int start_frame=0, n_frames=2000000;
+ bool do_ave = false;
+ bool do_skip = false;
+ int start_frame = 0;
+ int n_frames = 2000000;
int n_skip = 0;
- int NS=0, i_S;
+ int NS = 0
+ int i_S;
int i;
if (argc < 3 || argv[1][0] == '-') {
@@ -122,8 +125,9 @@
/* find NS */
for (i = 0; i < int(fieldList.size()); i++) {
- while (vlist.at(i)->update(-1) != KstObject::NO_CHANGE)
- ; // read vector
+ vlist.at(i)->writeLock();
+ while (vlist.at(i)->update(-1) != KstObject::NO_CHANGE); // read vector
+ vlist.at(i)->unlock();
if (vlist.at(i)->length() > NS) {
NS = vlist.at(i)->length();
}
More information about the Kst
mailing list