/haiku/src/add-ons/accelerants/nvidia/engine/ |
H A D | nv_brooktreetv.c | 55 uint8 buffer[21]; in BT_set_macro() local 74 memcpy(&buffer[2], &BtNtscMacro0, 19); in BT_set_macro() 79 memcpy(&buffer[2], &BtNtscMacro1, 19); in BT_set_macro() 84 memcpy(&buffer[2], &BtNtscMacro2, 19); in BT_set_macro() 89 memcpy(&buffer[2], &BtNtscMacro3, 19); in BT_set_macro() 100 memcpy(&buffer[2], &BtPalMacro0, 19); in BT_set_macro() 107 memcpy(&buffer[2], &BtPalMacro1, 19); in BT_set_macro() 113 buffer[0] = si->ps.tv_encoder.adress + WR; in BT_set_macro() 115 buffer[1] = 0xda; in BT_set_macro() 121 i2c_writebuffer(si->ps.tv_encoder.bus, buffer, sizeof(buffer)); in BT_set_macro() [all …]
|
/haiku/src/add-ons/kernel/generic/tty/ |
H A D | line_buffer.cpp | 14 clear_line_buffer(struct line_buffer &buffer) in clear_line_buffer() argument 16 buffer.in = 0; in clear_line_buffer() 17 buffer.first = 0; in clear_line_buffer() 23 init_line_buffer(struct line_buffer &buffer, size_t size) in init_line_buffer() argument 25 clear_line_buffer(buffer); in init_line_buffer() 27 buffer.buffer = (char *)malloc(size); in init_line_buffer() 28 if (buffer.buffer == NULL) in init_line_buffer() 31 buffer.size = size; in init_line_buffer() 38 uninit_line_buffer(struct line_buffer &buffer) in uninit_line_buffer() argument 40 free(buffer.buffer); in uninit_line_buffer() [all …]
|
/haiku/src/system/kernel/util/ |
H A D | ring_buffer.cpp | 32 space_left_in_buffer(struct ring_buffer *buffer) in space_left_in_buffer() argument 34 return buffer->size - buffer->in; in space_left_in_buffer() 39 read_from_buffer(struct ring_buffer *buffer, uint8 *data, ssize_t length, in read_from_buffer() argument 42 int32 available = buffer->in; in read_from_buffer() 52 if (buffer->first + length <= buffer->size) { in read_from_buffer() 55 if (user_memcpy(data, buffer->buffer + buffer->first, length) < B_OK) in read_from_buffer() 58 memcpy(data, buffer->buffer + buffer->first, length); in read_from_buffer() 61 size_t upper = buffer->size - buffer->first; in read_from_buffer() 65 if (user_memcpy(data, buffer->buffer + buffer->first, upper) < B_OK in read_from_buffer() 66 || user_memcpy(data + upper, buffer->buffer, lower) < B_OK) in read_from_buffer() [all …]
|
/haiku/src/add-ons/kernel/bus_managers/ps2/ |
H A D | packet_buffer.cpp | 18 packet_buffer* buffer in create_packet_buffer() local 20 if (buffer == NULL) in create_packet_buffer() 23 buffer->buffer = create_ring_buffer(size); in create_packet_buffer() 24 if (buffer->buffer == NULL) { in create_packet_buffer() 25 free(buffer); in create_packet_buffer() 28 B_INITIALIZE_SPINLOCK(&buffer->lock); in create_packet_buffer() 30 return buffer; in create_packet_buffer() 35 delete_packet_buffer(packet_buffer* buffer) in delete_packet_buffer() argument 37 delete_ring_buffer(buffer->buffer); in delete_packet_buffer() 38 free(buffer); in delete_packet_buffer() [all …]
|
/haiku/src/add-ons/accelerants/via/engine/ |
H A D | tvout.c | 23 void gxx0_maventv_PAL_init(uint8* buffer); 24 void gxx0_maventv_NTSC_init(uint8* buffer); 306 void gxx0_maventv_PAL_init(uint8* buffer) in gxx0_maventv_PAL_init() argument 311 buffer[0x00] = 0x2A; in gxx0_maventv_PAL_init() 312 buffer[0x01] = 0x09; in gxx0_maventv_PAL_init() 313 buffer[0x02] = 0x8A; in gxx0_maventv_PAL_init() 314 buffer[0x03] = 0xCB; in gxx0_maventv_PAL_init() 316 buffer[0x04] = 0x00; in gxx0_maventv_PAL_init() 317 buffer[0x05] = 0x00; in gxx0_maventv_PAL_init() 318 buffer[0x06] = 0xF9; in gxx0_maventv_PAL_init() [all …]
|
/haiku/src/add-ons/accelerants/skeleton/engine/ |
H A D | tvout.c | 23 void gxx0_maventv_PAL_init(uint8* buffer); 24 void gxx0_maventv_NTSC_init(uint8* buffer); 306 void gxx0_maventv_PAL_init(uint8* buffer) in gxx0_maventv_PAL_init() argument 311 buffer[0x00] = 0x2A; in gxx0_maventv_PAL_init() 312 buffer[0x01] = 0x09; in gxx0_maventv_PAL_init() 313 buffer[0x02] = 0x8A; in gxx0_maventv_PAL_init() 314 buffer[0x03] = 0xCB; in gxx0_maventv_PAL_init() 316 buffer[0x04] = 0x00; in gxx0_maventv_PAL_init() 317 buffer[0x05] = 0x00; in gxx0_maventv_PAL_init() 318 buffer[0x06] = 0xF9; in gxx0_maventv_PAL_init() [all …]
|
/haiku/src/add-ons/kernel/bus_managers/scsi/ |
H A D | dma_buffer.cpp | 107 dma_buffer *buffer = request->dma_buffer; in scsi_copy_dma_buffer() local 108 const physical_entry *sg_list = buffer->sg_list_orig; in scsi_copy_dma_buffer() 109 uint32 num_vecs = buffer->sg_count_orig; in scsi_copy_dma_buffer() 110 uchar *buffer_data = buffer->address; in scsi_copy_dma_buffer() 139 scsi_free_dma_buffer(dma_buffer *buffer) in scsi_free_dma_buffer() argument 141 if (buffer->area > 0) { in scsi_free_dma_buffer() 144 delete_area(buffer->area); in scsi_free_dma_buffer() 145 buffer->area = 0; in scsi_free_dma_buffer() 146 buffer->size = 0; in scsi_free_dma_buffer() 149 if (buffer->sg_list_area > 0) { in scsi_free_dma_buffer() [all …]
|
/haiku/src/libs/zydis/Zydis/ |
H A D | FormatterBuffer.c | 73 ZyanStatus ZydisFormatterBufferGetToken(const ZydisFormatterBuffer* buffer, in ZydisFormatterBufferGetToken() argument 76 if (!buffer || !token) in ZydisFormatterBufferGetToken() 81 *token = ((ZydisFormatterTokenConst*)buffer->string.vector.data - 1); in ZydisFormatterBufferGetToken() 90 ZyanStatus ZydisFormatterBufferGetString(ZydisFormatterBuffer* buffer, ZyanString** string) in ZydisFormatterBufferGetString() argument 92 if (!buffer || !string) in ZydisFormatterBufferGetString() 97 if (buffer->is_token_list && in ZydisFormatterBufferGetString() 98 ((ZydisFormatterTokenConst*)buffer->string.vector.data - 1)->type == ZYDIS_TOKEN_INVALID) in ZydisFormatterBufferGetString() 103 ZYAN_ASSERT(buffer->string.vector.data); in ZydisFormatterBufferGetString() 104 ZYAN_ASSERT(buffer->string.vector.size); in ZydisFormatterBufferGetString() 106 *string = &buffer->string; in ZydisFormatterBufferGetString() [all …]
|
H A D | FormatterIntel.c | 46 ZydisFormatterBuffer* buffer, ZydisFormatterContext* context) in ZydisFormatterIntelFormatInstruction() argument 49 ZYAN_ASSERT(buffer); in ZydisFormatterIntelFormatInstruction() 54 ZYAN_CHECK(formatter->func_print_prefixes(formatter, buffer, context)); in ZydisFormatterIntelFormatInstruction() 55 ZYAN_CHECK(formatter->func_print_mnemonic(formatter, buffer, context)); in ZydisFormatterIntelFormatInstruction() 58 ZYDIS_BUFFER_REMEMBER(buffer, state_mnemonic); in ZydisFormatterIntelFormatInstruction() 71 ZYDIS_BUFFER_REMEMBER(buffer, buffer_state); in ZydisFormatterIntelFormatInstruction() 75 ZYDIS_BUFFER_APPEND(buffer, DELIM_OPERAND); in ZydisFormatterIntelFormatInstruction() 78 ZYDIS_BUFFER_APPEND(buffer, DELIM_MNEMONIC); in ZydisFormatterIntelFormatInstruction() 87 status = formatter->func_pre_operand(formatter, buffer, context); in ZydisFormatterIntelFormatInstruction() 90 ZYAN_CHECK(ZydisFormatterBufferRestore(buffer, buffer_state)); in ZydisFormatterIntelFormatInstruction() [all …]
|
H A D | FormatterATT.c | 44 ZydisFormatterBuffer* buffer, ZydisFormatterContext* context) in ZydisFormatterATTFormatInstruction() argument 47 ZYAN_ASSERT(buffer); in ZydisFormatterATTFormatInstruction() 52 ZYAN_CHECK(formatter->func_print_prefixes(formatter, buffer, context)); in ZydisFormatterATTFormatInstruction() 53 ZYAN_CHECK(formatter->func_print_mnemonic(formatter, buffer, context)); in ZydisFormatterATTFormatInstruction() 56 ZYDIS_BUFFER_REMEMBER(buffer, state_mnemonic); in ZydisFormatterATTFormatInstruction() 71 ZYDIS_BUFFER_REMEMBER(buffer, buffer_state); in ZydisFormatterATTFormatInstruction() 75 ZYDIS_BUFFER_APPEND(buffer, DELIM_OPERAND); in ZydisFormatterATTFormatInstruction() 78 ZYDIS_BUFFER_APPEND(buffer, DELIM_MNEMONIC); in ZydisFormatterATTFormatInstruction() 87 status = formatter->func_pre_operand(formatter, buffer, context); in ZydisFormatterATTFormatInstruction() 90 ZYAN_CHECK(ZydisFormatterBufferRestore(buffer, buffer_state)); in ZydisFormatterATTFormatInstruction() [all …]
|
H A D | FormatterBase.c | 155 ZydisFormatterBuffer* buffer, ZydisFormatterContext* context) in ZydisFormatterBaseFormatOperandREG() argument 158 ZYAN_ASSERT(buffer); in ZydisFormatterBaseFormatOperandREG() 161 return formatter->func_print_register(formatter, buffer, context, context->operand->reg.value); in ZydisFormatterBaseFormatOperandREG() 165 ZydisFormatterBuffer* buffer, ZydisFormatterContext* context) in ZydisFormatterBaseFormatOperandPTR() argument 168 ZYAN_ASSERT(buffer); in ZydisFormatterBaseFormatOperandPTR() 171 ZYDIS_BUFFER_APPEND_TOKEN(buffer, ZYDIS_TOKEN_IMMEDIATE); in ZydisFormatterBaseFormatOperandPTR() 172 ZYDIS_STRING_APPEND_NUM_U(formatter, formatter->addr_base, &buffer->string, in ZydisFormatterBaseFormatOperandPTR() 174 ZYDIS_BUFFER_APPEND(buffer, DELIM_SEGMENT); in ZydisFormatterBaseFormatOperandPTR() 189 ZYDIS_BUFFER_APPEND_TOKEN(buffer, ZYDIS_TOKEN_IMMEDIATE); in ZydisFormatterBaseFormatOperandPTR() 190 ZYDIS_STRING_APPEND_NUM_U(formatter, formatter->addr_base, &buffer->string, in ZydisFormatterBaseFormatOperandPTR() [all …]
|
/haiku/src/kits/package/hpkg/ |
H A D | BlockBufferPoolImpl.cpp | 68 PoolBuffer* buffer = *owner; in GetBuffer() local 69 fCachedBuffers.Remove(buffer); in GetBuffer() 73 return buffer; in GetBuffer() 77 PoolBuffer* buffer = fUnusedBuffers.RemoveHead(); in GetBuffer() local 78 if (buffer != NULL) { in GetBuffer() 79 buffer->SetOwner(owner); in GetBuffer() 82 *owner = buffer; in GetBuffer() 85 return buffer; in GetBuffer() 90 buffer = fCachedBuffers.RemoveHead(); in GetBuffer() 91 if (buffer != NULL) { in GetBuffer() [all …]
|
/haiku/src/add-ons/kernel/network/protocols/tcp/ |
H A D | BufferQueue.cpp | 46 net_buffer *buffer; in ~BufferQueue() local 47 while ((buffer = fList.RemoveHead()) != NULL) { in ~BufferQueue() 48 gBufferModule->free(buffer); in ~BufferQueue() 72 BufferQueue::Add(net_buffer *buffer) in Add() argument 74 Add(buffer, fLastSequence); in Add() 79 BufferQueue::Add(net_buffer *buffer, tcp_sequence sequence) in Add() argument 82 B_PRIu32 ")\n", this, buffer, buffer->size, sequence.Number())); in Add() 88 if (tcp_sequence(sequence + buffer->size) <= fFirstSequence in Add() 89 || buffer->size == 0) { in Add() 91 gBufferModule->free(buffer); in Add() [all …]
|
/haiku/src/add-ons/kernel/network/stack/ |
H A D | simple_net_buffer.cpp | 66 static status_t append_data(net_buffer *buffer, const void *data, size_t size); 95 net_buffer_private *buffer = new(nothrow) net_buffer_private; in create_buffer() local 96 if (buffer == NULL) in create_buffer() 99 TRACE(("%ld: create buffer %p\n", find_thread(NULL), buffer)); in create_buffer() 101 buffer->data = NULL; in create_buffer() 102 new(&buffer->ancillary_data) ancillary_data_list; in create_buffer() 104 buffer->source = (sockaddr *)&buffer->storage.source; in create_buffer() 105 buffer->destination = (sockaddr *)&buffer->storage.destination; in create_buffer() 107 buffer->storage.source.ss_len = 0; in create_buffer() 108 buffer->storage.destination.ss_len = 0; in create_buffer() [all …]
|
H A D | net_buffer.cpp | 158 static status_t append_data(net_buffer* buffer, const void* data, size_t size); 186 NetBufferTraceEntry(net_buffer* buffer) in NetBufferTraceEntry() argument 188 fBuffer(buffer) in NetBufferTraceEntry() 213 Create(size_t headerSpace, net_buffer* buffer) in Create() argument 215 NetBufferTraceEntry(buffer), in Create() 234 Free(net_buffer* buffer) in Free() argument 236 NetBufferTraceEntry(buffer) in Free() 250 Duplicate(net_buffer* buffer, net_buffer* clone) in Duplicate() argument 252 NetBufferTraceEntry(buffer), in Duplicate() 270 Clone(net_buffer* buffer, bool shareFreeSpace, net_buffer* clone) in Clone() argument [all …]
|
/haiku/src/add-ons/kernel/file_systems/iso9660/ |
H A D | iso9660.cpp | 145 init_volume_date(ISOVolDate *date, char *buffer) in init_volume_date() argument 147 memcpy(date, buffer, ISO_VOL_DATE_SIZE); in init_volume_date() 153 init_node_date(ISORecDate *date, char *buffer) in init_node_date() argument 155 memcpy(date, buffer, sizeof(struct ISORecDate)); in init_node_date() 161 InitVolDesc(iso9660_volume *volume, char *buffer) in InitVolDesc() argument 165 volume->volDescType = *(uint8 *)buffer; in InitVolDesc() 166 buffer += sizeof(volume->volDescType); in InitVolDesc() 170 strncpy(volume->stdIDString, buffer, kStdIDStringLen); in InitVolDesc() 171 buffer += kStdIDStringLen; in InitVolDesc() 173 volume->volDescVersion = *(uint8 *)buffer; in InitVolDesc() [all …]
|
/haiku/src/add-ons/accelerants/matrox/engine/ |
H A D | mga_maventv.c | 299 static void gxx0_maventv_PAL_init(uint8* buffer) in gxx0_maventv_PAL_init() argument 304 buffer[0x00] = 0x2A; in gxx0_maventv_PAL_init() 305 buffer[0x01] = 0x09; in gxx0_maventv_PAL_init() 306 buffer[0x02] = 0x8A; in gxx0_maventv_PAL_init() 307 buffer[0x03] = 0xCB; in gxx0_maventv_PAL_init() 309 buffer[0x04] = 0x00; in gxx0_maventv_PAL_init() 310 buffer[0x05] = 0x00; in gxx0_maventv_PAL_init() 311 buffer[0x06] = 0xF9; in gxx0_maventv_PAL_init() 312 buffer[0x07] = 0x00; in gxx0_maventv_PAL_init() 314 buffer[0x08] = 0x7E; in gxx0_maventv_PAL_init() [all …]
|
/haiku/src/libs/icon/flat_icon/ |
H A D | FlatIconImporter.cpp | 74 LittleEndianBuffer buffer(size); in Import() local 75 if (!buffer.Buffer()) in Import() 78 if (stream->Read(buffer.Buffer(), size) != size) in Import() 81 ret = _ParseSections(buffer, icon); in Import() 100 LittleEndianBuffer buffer(_buffer, size); in Import() local 102 return _ParseSections(buffer, icon); in Import() 109 FlatIconImporter::_ParseSections(LittleEndianBuffer& buffer, Icon* icon) in _ParseSections() argument 113 if (!buffer.Read(magic) || magic != FLAT_ICON_MAGIC) in _ParseSections() 118 status_t ret = _ParseStyles(buffer, styles); in _ParseSections() 127 ret = _ParsePaths(buffer, paths); in _ParseSections() [all …]
|
/haiku/src/kits/app/ |
H A D | MessageUtils.cpp | 19 CalculateChecksum(const uint8 *buffer, int32 size) in CalculateChecksum() argument 25 sum += B_BENDIAN_TO_HOST_INT32(*(int32 *)buffer); in CalculateChecksum() 26 buffer += 4; in CalculateChecksum() 31 temp = (temp << 8) + *buffer++; in CalculateChecksum() 41 entry_ref_flatten(char *buffer, size_t *size, const entry_ref *ref) in entry_ref_flatten() argument 46 memcpy((void *)buffer, (const void *)&ref->device, sizeof(ref->device)); in entry_ref_flatten() 47 buffer += sizeof(ref->device); in entry_ref_flatten() 48 memcpy((void *)buffer, (const void *)&ref->directory, sizeof(ref->directory)); in entry_ref_flatten() 49 buffer += sizeof(ref->directory); in entry_ref_flatten() 58 memcpy((void *)buffer, (const void *)ref->name, nameLength); in entry_ref_flatten() [all …]
|
/haiku/src/kits/media/ |
H A D | BufferCache.cpp | 34 delete entry.value.buffer; in ~BufferCache() 47 existing->buffer->fFlags |= BUFFER_TO_RECLAIM; in GetBuffer() 48 return existing->buffer; in GetBuffer() 52 info.buffer = id; in GetBuffer() 53 BBuffer* buffer = new(std::nothrow) BBuffer(info); in GetBuffer() local 54 if (buffer == NULL || buffer->ID() <= 0 in GetBuffer() 55 || buffer->Data() == NULL) { in GetBuffer() 56 delete buffer; in GetBuffer() 60 if (buffer->ID() != id) in GetBuffer() 64 entry.buffer = buffer; in GetBuffer() [all …]
|
/haiku/src/libs/stdc++/legacy/ |
H A D | editbuf.cc | 56 str->buffer->delete_range(str->buffer->tell((buf_char*)pptr()), in truncate() 57 str->buffer->tell(str->end)); in truncate() 62 inline void disconnect_gap_from_file(edit_buffer* buffer, FILE* fp) in disconnect_gap_from_file() argument 64 if (buffer->gap_start_ptr != &fp->__bufp) in disconnect_gap_from_file() 66 buffer->gap_start_normal = fp->__bufp; in disconnect_gap_from_file() 67 buffer->gap_start_ptr = &buffer->gap_start_normal; in disconnect_gap_from_file() 71 void edit_streambuf::flush_to_buffer(edit_buffer* buffer) in flush_to_buffer() argument 73 if (pptr() > buffer->_gap_start && pptr() < buffer->gap_end()) in flush_to_buffer() 74 buffer->_gap_start = pptr(); in flush_to_buffer() 77 void edit_streambuf::disconnect_gap_from_file(edit_buffer* buffer) in disconnect_gap_from_file() argument [all …]
|
/haiku/src/add-ons/input_server/methods/pen/ |
H A D | DumpMessage.cpp | 25 char buffer[100]; in HexDumpToStream() local 29 sprintf(buffer, "0x%06lx: ", i); in HexDumpToStream() 30 stream.Write(buffer, strlen(buffer)); in HexDumpToStream() 33 sprintf(buffer, "%02x", p[i+j]); in HexDumpToStream() 35 sprintf(buffer, " "); in HexDumpToStream() 37 sprintf(buffer+strlen(buffer), " "); in HexDumpToStream() 38 stream.Write(buffer, strlen(buffer)); in HexDumpToStream() 40 sprintf(buffer, " '"); in HexDumpToStream() 41 stream.Write(buffer, strlen(buffer)); in HexDumpToStream() 44 sprintf(buffer, " "); in HexDumpToStream() [all …]
|
/haiku/src/kits/debugger/dwarf/ |
H A D | AttributeValue.cpp | 14 AttributeValue::ToString(char* buffer, size_t size) in ToString() argument 18 snprintf(buffer, size, "%#" B_PRIx64, address); in ToString() 19 return buffer; in ToString() 21 snprintf(buffer, size, "(%p, %#" B_PRIx64 ")", block.data, in ToString() 23 return buffer; in ToString() 25 snprintf(buffer, size, "%#" B_PRIx64, constant); in ToString() 26 return buffer; in ToString() 28 snprintf(buffer, size, "%s", flag ? "true" : "false"); in ToString() 29 return buffer; in ToString() 38 snprintf(buffer, size, "%#" B_PRIx64, pointer); in ToString() [all …]
|
/haiku/src/apps/icon-o-matic/import_export/flat_icon/ |
H A D | FlatIconExporter.cpp | 81 LittleEndianBuffer buffer; in Export() local 84 status_t ret = _Export(buffer, icon); in Export() 89 ssize_t written = stream->Write(buffer.Buffer(), buffer.SizeUsed()); in Export() 90 if (written != (ssize_t)buffer.SizeUsed()) { in Export() 135 LittleEndianBuffer buffer; in Export() local 138 status_t ret = _Export(buffer, icon); in Export() 152 buffer.Buffer(), buffer.SizeUsed()); in Export() 153 if (written != (ssize_t)buffer.SizeUsed()) { in Export() 171 FlatIconExporter::_Export(LittleEndianBuffer& buffer, const Icon* icon) in _Export() argument 173 if (!buffer.Write(FLAT_ICON_MAGIC)) in _Export() [all …]
|
/haiku/headers/libs/zydis/Zydis/Internal/ |
H A D | FormatterBase.h | 125 #define ZYDIS_BUFFER_APPEND_TOKEN(buffer, type) \ argument 126 if ((buffer)->is_token_list) \ 128 ZYAN_CHECK(ZydisFormatterBufferAppend(buffer, type)); \ 140 #define ZYDIS_BUFFER_REMEMBER(buffer, state) \ argument 141 if ((buffer)->is_token_list) \ 143 (state) = (ZyanUPointer)(buffer)->string.vector.data; \ 146 (state) = (ZyanUPointer)(buffer)->string.vector.size; \ 155 #define ZYDIS_BUFFER_APPEND(buffer, name) \ argument 156 if ((buffer)->is_token_list) \ 158 ZYAN_CHECK(ZydisFormatterBufferAppendPredefined(buffer, TOK_ ## name)); \ [all …]
|