src/solaris/native/sun/xawt/XToolkit.c
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File jdk Sdiff src/solaris/native/sun/xawt

src/solaris/native/sun/xawt/XToolkit.c

Print this page




 682     PRINT("%d of %d, res: %d\n", (int)(poll_wakeup_time-poll_sleep_time), (int)timeout, result);
 683 
 684     AWT_LOCK();
 685     if (result == 0) {
 686         /* poll() timed out -- update timeout value */
 687         update_poll_timeout(TIMEOUT_TIMEDOUT);
 688         PRINT2("performPoll(): TIMEOUT_TIMEDOUT curPollTimeout = %d \n", curPollTimeout);
 689     }
 690     if (pollFds[1].revents) {
 691         int count;
 692         PRINT("Woke up\n");
 693         /* There is data on the AWT pipe - empty it */
 694         do {
 695             count = read(AWT_READPIPE, read_buf, AWT_POLL_BUFSIZE );
 696         } while (count == AWT_POLL_BUFSIZE );
 697         PRINT2("performPoll():  data on the AWT pipe: curPollTimeout = %d \n", curPollTimeout);
 698     }
 699     if (pollFds[0].revents) {
 700         // Events in X pipe
 701         update_poll_timeout(TIMEOUT_EVENTS);
 702         PRINT2("performPoll(): TIMEOUT_EVENTS curPollTimeout = %ld \n", curPollTimeout);
 703     }
 704     return;
 705 
 706 } /* performPoll() */
 707 
 708 /**
 709  * Schedules next auto-flush event or performs forced flush depending
 710  * on the time of the previous flush.
 711  */
 712 void awt_output_flush() {
 713     if (awt_next_flush_time == 0) {
 714         JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
 715 
 716         jlong curTime = awtJNI_TimeMillis(); // current time
 717         jlong l_awt_last_flush_time = awt_last_flush_time; // last time we flushed queue
 718         jlong next_flush_time = l_awt_last_flush_time + AWT_FLUSH_TIMEOUT;
 719 
 720         if (curTime >= next_flush_time) {
 721             // Enough time passed from last flush
 722             PRINT("f1\n");




 682     PRINT("%d of %d, res: %d\n", (int)(poll_wakeup_time-poll_sleep_time), (int)timeout, result);
 683 
 684     AWT_LOCK();
 685     if (result == 0) {
 686         /* poll() timed out -- update timeout value */
 687         update_poll_timeout(TIMEOUT_TIMEDOUT);
 688         PRINT2("performPoll(): TIMEOUT_TIMEDOUT curPollTimeout = %d \n", curPollTimeout);
 689     }
 690     if (pollFds[1].revents) {
 691         int count;
 692         PRINT("Woke up\n");
 693         /* There is data on the AWT pipe - empty it */
 694         do {
 695             count = read(AWT_READPIPE, read_buf, AWT_POLL_BUFSIZE );
 696         } while (count == AWT_POLL_BUFSIZE );
 697         PRINT2("performPoll():  data on the AWT pipe: curPollTimeout = %d \n", curPollTimeout);
 698     }
 699     if (pollFds[0].revents) {
 700         // Events in X pipe
 701         update_poll_timeout(TIMEOUT_EVENTS);
 702         PRINT2("performPoll(): TIMEOUT_EVENTS curPollTimeout = %d \n", curPollTimeout);
 703     }
 704     return;
 705 
 706 } /* performPoll() */
 707 
 708 /**
 709  * Schedules next auto-flush event or performs forced flush depending
 710  * on the time of the previous flush.
 711  */
 712 void awt_output_flush() {
 713     if (awt_next_flush_time == 0) {
 714         JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
 715 
 716         jlong curTime = awtJNI_TimeMillis(); // current time
 717         jlong l_awt_last_flush_time = awt_last_flush_time; // last time we flushed queue
 718         jlong next_flush_time = l_awt_last_flush_time + AWT_FLUSH_TIMEOUT;
 719 
 720         if (curTime >= next_flush_time) {
 721             // Enough time passed from last flush
 722             PRINT("f1\n");


src/solaris/native/sun/xawt/XToolkit.c
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File