Exemple #1
0
int main(int ac, char **av)
{
	int lc;

	tst_parse_opts(ac, av, NULL, NULL);

	setup();

	/*
	 * The following loop checks looping state if -c option given
	 */
	for (lc = 0; TEST_LOOPING(lc); lc++) {

		tst_count = 0;

		TEST(my_gettid());

		if (TEST_RETURN == -1) {
			tst_resm(TFAIL, "gettid() Failed, errno=%d: %s",
				 TEST_ERRNO, strerror(TEST_ERRNO));
		} else {
			tst_resm(TPASS, "gettid() returned %ld",
				 TEST_RETURN);
		}
	}

	cleanup();
	tst_exit();
}
int main(int ac, char **av)
{
	int lc;			/* loop counter */
	char *msg;		/* parse_opts() return message */

	if ((msg = parse_opts(ac, av, (option_t *) NULL, NULL)) != (char *)NULL) {
		tst_brkm(TBROK, tst_exit, "OPTION PARSING ERROR - %s", msg);
	 /*NOTREACHED*/}

	setup();

	/*
	 * The following loop checks looping state if -c option given
	 */
	for (lc = 0; TEST_LOOPING(lc); lc++) {

		Tst_count = 0;

		TEST(my_gettid());

		if (TEST_RETURN == -1) {
			TEST_ERROR_LOG(TEST_ERRNO);
			tst_resm(TFAIL, "gettid() Failed, errno=%d: %s",
				 TEST_ERRNO, strerror(TEST_ERRNO));
		} else {
	    /***************************************************************
	     * only perform functional verification if flag set (-f not given)
	     ***************************************************************/
			if (STD_FUNCTIONAL_TEST) {
				/* No Verification test, yet... */
				tst_resm(TPASS, "gettid() returned %ld",
					 TEST_RETURN);
			}
		}
	}

	cleanup();

	 /*NOTREACHED*/ return 0;
}
Exemple #3
0
void NLOPT_STDCALL nlopt_srand_time(void) {
     nlopt_srand(nlopt_time_seed() + my_gettid() * 314159);
}