Diff

Differences From Artifact [ca95c3f44a]:

To Artifact [34dea9bf8d]:


713
714
715
716
717
718
719

720
721
722
723
724
725
726
727
728


729
730
731
732
733
734
735
....
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923

	atomic_store(&filed_sockettimeout_sockstatus[sockfd].valid, false);

	return;
}

static void *filed_sockettimeout_thread(void *arg) {

	time_t now, expiration_time;
	pthread_t thread_id;
	long idx;
	int count;
	bool valid;

	while (1) {
		for (count = 0; count < 10; count++) {
			usleep(30000000);



			now = time(NULL);

			atomic_store(&filed_sockettimeout_time, now);
		}

		for (idx = 0; idx < filed_sockettimeout_sockstatus_length; idx++) {
................................................................................

		return(5);
	}

	/* Wait for threads to exit */
	/* XXX:TODO: Monitor thread usage */
	while (1) {
		sleep(60);
	}

	/* Return in failure */
	return(2);
}







>








|
>
>







 







|





713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
....
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926

	atomic_store(&filed_sockettimeout_sockstatus[sockfd].valid, false);

	return;
}

static void *filed_sockettimeout_thread(void *arg) {
	struct timespec sleep_time;
	time_t now, expiration_time;
	pthread_t thread_id;
	long idx;
	int count;
	bool valid;

	while (1) {
		for (count = 0; count < 10; count++) {
			sleep_time.tv_sec = 30;
			sleep_time.tv_nsec = 0;
			nanosleep(&sleep_time, NULL);

			now = time(NULL);

			atomic_store(&filed_sockettimeout_time, now);
		}

		for (idx = 0; idx < filed_sockettimeout_sockstatus_length; idx++) {
................................................................................

		return(5);
	}

	/* Wait for threads to exit */
	/* XXX:TODO: Monitor thread usage */
	while (1) {
		sleep(86400);
	}

	/* Return in failure */
	return(2);
}