コード例 #1
0
ファイル: mq_timedsend.c プロジェクト: vocho/openqnx
int mq_timedsend_woption(mqd_t mq, const char *buff, size_t nbytes, 
           unsigned msgprio, const struct timespec *timeout, clockid_t clock_choice) {
	uint64_t	t = timespec2nsec(timeout);

	
	if(!TIMESPEC_VALID(timeout)) {
		errno = EINVAL;
		return -1;
	}
	if(TimerTimeout(clock_choice, TIMER_ABSTIME | _NTO_TIMEOUT_SEND | _NTO_TIMEOUT_REPLY, 0, &t, 0) == -1) {
		return -1;
	}
	return (_writex(mq, buff, nbytes, _IO_XTYPE_MQUEUE | (msgprio << 16), 0, 0) == -1) ? -1 : 0;
}
コード例 #2
0
ファイル: adbclient.cpp プロジェクト: SmartisanTech/Wrench
bool AdbClient::writex(const void* data, qint64 max)
{
    return _writex(adbSock, data, max);
}