Lines Matching defs:hgcm_buffer
979 CRVBOXHGCMBUFFER *hgcm_buffer;
1009 hgcm_buffer = (CRVBOXHGCMBUFFER *)(*bufp) - 1;
1010 CRASSERT(hgcm_buffer->magic == CR_VBOXHGCM_BUFFER_MAGIC);
1022 crVBoxHGCMWriteReadExact(conn, start, len, hgcm_buffer->kind);
1028 crBufferPoolPush(g_crvboxhgcm.bufpool, hgcm_buffer, hgcm_buffer->allocated);
1095 CRVBOXHGCMBUFFER *hgcm_buffer = (CRVBOXHGCMBUFFER *) buf - 1;
1097 CRASSERT(hgcm_buffer->magic == CR_VBOXHGCM_BUFFER_MAGIC);
1100 conn->recv_credits += hgcm_buffer->len;
1102 switch (hgcm_buffer->kind)
1113 crBufferPoolPush(g_crvboxhgcm.bufpool, hgcm_buffer, hgcm_buffer->allocated);
1121 crFree( hgcm_buffer );
1125 crError( "Weird buffer kind trying to free in crVBoxHGCMFree: %d", hgcm_buffer->kind );
1145 CRVBOXHGCMBUFFER *hgcm_buffer;
1159 hgcm_buffer = (CRVBOXHGCMBUFFER *) _crVBoxHGCMAlloc( conn ) - 1;
1160 hgcm_buffer->len = sizeof(CRMessageRedirPtr);
1162 msg = (CRMessage *) (hgcm_buffer + 1);
1187 hgcm_buffer = (CRVBOXHGCMBUFFER *) _crVBoxHGCMAlloc( conn ) - 1;
1194 hgcm_buffer = (CRVBOXHGCMBUFFER *) crAlloc( sizeof(CRVBOXHGCMBUFFER) + len );
1195 hgcm_buffer->magic = CR_VBOXHGCM_BUFFER_MAGIC;
1196 hgcm_buffer->kind = CR_VBOXHGCM_MEMORY_BIG;
1197 hgcm_buffer->allocated = sizeof(CRVBOXHGCMBUFFER) + len;
1200 hgcm_buffer->len = len;
1201 _crVBoxHGCMReadBytes(conn, hgcm_buffer + 1, len);
1203 msg = (CRMessage *) (hgcm_buffer + 1);
1699 CRVBOXHGCMBUFFER *hgcm_buffer = (CRVBOXHGCMBUFFER *) buf - 1;
1701 CRASSERT(hgcm_buffer->magic == CR_VBOXHGCM_BUFFER_MAGIC);
1703 if (hgcm_buffer->kind == CR_VBOXHGCM_UHGSMI_BUFFER)
1705 PVBOXUHGSMI_BUFFER pBuf = _crVBoxHGSMIBufFromHdr(hgcm_buffer);
2095 CRVBOXHGCMBUFFER *hgcm_buffer;
2133 hgcm_buffer = (CRVBOXHGCMBUFFER *) *bufp - 1;
2134 CRASSERT(hgcm_buffer->magic == CR_VBOXHGCM_BUFFER_MAGIC);
2135 if (hgcm_buffer->magic != CR_VBOXHGCM_BUFFER_MAGIC)
2141 if (hgcm_buffer->kind != CR_VBOXHGCM_UHGSMI_BUFFER)
2157 pBuf = _crVBoxHGSMIBufFromHdr(hgcm_buffer);
2410 CRVBOXHGCMBUFFER *hgcm_buffer = (CRVBOXHGCMBUFFER *) data;
2412 CRASSERT(hgcm_buffer->magic == CR_VBOXHGCM_BUFFER_MAGIC);
2414 switch (hgcm_buffer->kind)
2417 crDebug("crVBoxHGCMBufferFree: CR_VBOXHGCM_MEMORY: %p", hgcm_buffer);
2418 crFree( hgcm_buffer );
2421 crDebug("crVBoxHGCMBufferFree: CR_VBOXHGCM_MEMORY_BIG: %p", hgcm_buffer);
2422 crFree( hgcm_buffer );
2426 crError( "Weird buffer kind trying to free in crVBoxHGCMBufferFree: %d", hgcm_buffer->kind );