예제 #1
0
파일: stub.c 프로젝트: fishbaoz/chrome-ec
int tcpm_init(int port)
{
	int rv;

	tcpc_init(port);
	rv = init_alert_mask(port);
	if (rv)
		return rv;

	return init_power_status_mask(port);
}
예제 #2
0
파일: test.c 프로젝트: avsm/TESLA
static void
test(int scope)
{
	struct tcpcb tcb1, tcb2, tcb3, tcb4;
	int i;

	tcpc_init(scope);
	printf("\nScope: %s\n", scope == TESLA_SCOPE_GLOBAL ? "global" :
	    "per-thread");

	tcpc_setaction_debug();	/* Use printf(), not assert(). */

        printf("Sending valid sequence...");
	for (i = 0; i < test1_len; i++) {
		tcb1.t_state = test1[i];
	}
	tcp_free(&tcb1);
	printf(" OK\n");

	printf("Sending invalid sequence...error follows:\n");
	for (i = 0; i < test2_len; i++) {
		tcb2.t_state = test2[i];
	}
	tcp_free(&tcb2);
	printf(" OK\n");

	printf("Initial closed to closed:\n");
	for (i = 0; i < test3_len; i++) {
		tcb3.t_state = test3[i];
	}
	tcp_free(&tcb3);
	printf(" OK\n");

	printf("Free directly from TCPS_LAST_ACK\n");
	for (i = 0; i < test4_len; i++) {
		tcb4.t_state = test4[i];
	}
	tcp_free(&tcb4);
	printf(" OK\n");
}     
예제 #3
0
파일: stub.c 프로젝트: fourier49/BZ_DEV_EC
int tcpm_init(int port)
{
	tcpc_init(port);
	return init_alert_mask(port);
}
예제 #4
0
파일: tcpc_assertion.c 프로젝트: avsm/TESLA
static void
tcpc_sysinit(__unused void *arg)
{

	tcpc_init(TESLA_SCOPE_GLOBAL);
}