rem: vector<unsigned char*>::size_type q;
add: vector<caddr_t>::size_type q;
context: void *ecasound_fiommap_process(void *) {   //  cerr << "(eca-fileio-mmap-fthread) process()\n";  vector<ECASOUND_FIOMMAP_BUFFER*>::const_iterator p;  vector<unsigned char*>::size_type q;  //  if (setpriority(PRIO_PROCESS, 0, -10) == -1)  //  mlockall(MCL_CURRENT | MCL_FUTURE);  while(true) {    pthread_cleanup_push(ecasound_fiommap_clean, (void *) &ecasound_fiommap_lock);    pthread_mutex_lock(&ecasound_fiommap_lock);    pthread_cond_wait(&ecasound_fiommap_cond, &ecasound_fiommap_lock);    p = ecasound_fiommap_buffer.begin();    while(p != ecasound_fiommap_buffer.end()) {      q = 0;      while(q != (*p)->buffers.size()) {	if ((*p)->mmap_low != -1) {	  if ((*p)->locked_buffer != q) {	    if ((*p)->ready_for_fill[q] == false) {	      ++q;	      continue;	    }	    	    (*p)->mmap_low += ecasound_fiommap_buffersize;	    (*p)->mmap_high += ecasound_fiommap_buffersize;	    munlock((*p)->buffers[q], (*p)->mmap_length[q]);	    munmap((*p)->buffers[q], (*p)->mmap_length[q]);	    if ((*p)->mmap_low > (*p)->file_length) {	      (*p)->mmap_length[q] = 0;	      (*p)->ready_for_fill[q] = false;	      break;	    }	    if ((*p)->mmap_high > (*p)->file_length)	      (*p)->mmap_length[q] = (*p)->file_length - (*p)->mmap_low;	    else 	      (*p)->mmap_length[q] =  ecasound_fiommap_buffersize;	    //	    cerr << "(eca-fileio-mmap-fthread) mapping[s] (processs) from " << (*p)->mmap_low;	    //	    cerr << " to " << (*p)->mmap_low + (*p)->mmap_length[q] << " (fd:" << (*p)->fd;	    //	    cerr << ", buf:" << q << ").\n";	    (*p)->buffers[q] = (unsigned char*)mmap(0,						    (*p)->mmap_length[q],						    PROT_READ,						    MAP_SHARED,						    (*p)->fd,						    (*p)->mmap_low);	    mlock((*p)->buffers[q], (*p)->mmap_length[q]);	    //	    cerr << "(eca-fileio-mmap-fthread) mapping[f] (processs) from " << (*p)->mmap_low;	    //	    cerr	 << " to " << (*p)->mmap_high << " (fd:" << (*p)->fd;	    //	    cerr     << ", buf:" << q << ").\n";	    (*p)->ready_for_fill[q] = false;	  }	}	++q;      }      ++p;    }    pthread_cond_signal(&ecasound_fiommap_cond);    pthread_mutex_unlock(&ecasound_fiommap_lock);    pthread_cleanup_pop(0);    pthread_testcancel();  }}