/freebsd/contrib/llvm-project/clang/lib/APINotes/ |
H A D | APINotesWriter.cpp | 1 //===-- APINotesWriter.cpp - API Notes Writer -------------------*- C++ -*-===// 307 llvm::support::endian::Writer writer(OS, llvm::endianness::little); in EmitKeyDataLength() local 308 writer.write<uint16_t>(KeyLength); in EmitKeyDataLength() 309 writer.write<uint16_t>(DataLength); in EmitKeyDataLength() 316 llvm::support::endian::Writer writer(OS, llvm::endianness::little); in EmitData() local 317 writer.write<uint32_t>(Data); in EmitData() 367 llvm::support::endian::Writer writer(OS, llvm::endianness::little); in EmitKeyDataLength() local 368 writer.write<uint16_t>(KeyLength); in EmitKeyDataLength() 369 writer.write<uint16_t>(DataLength); in EmitKeyDataLength() 374 llvm::support::endian::Writer writer(OS, llvm::endianness::little); in EmitKey() local [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/X86/MCTargetDesc/ |
H A D | X86MachObjectWriter.cpp | 1 //===-- X86MachObjectWriter.cpp - X86 Mach-O Writer -----------------------===// 27 bool recordScatteredRelocation(MachObjectWriter *Writer, 34 void recordTLVPRelocation(MachObjectWriter *Writer, 41 void RecordX86Relocation(MachObjectWriter *Writer, 47 void RecordX86_64Relocation(MachObjectWriter *Writer, MCAssembler &Asm, 55 void recordRelocation(MachObjectWriter *Writer, MCAssembler &Asm, in recordRelocation() argument 58 if (Writer->is64Bit()) in recordRelocation() 59 RecordX86_64Relocation(Writer, Asm, Fragment, Fixup, Target, FixedValue); in recordRelocation() 61 RecordX86Relocation(Writer, Asm, Fragment, Fixup, Target, FixedValue); in recordRelocation() 96 MachObjectWriter *Writer, MCAssembler &Asm, const MCFragment *Fragment, in RecordX86_64Relocation() argument [all …]
|
/freebsd/sys/contrib/ck/include/ |
H A D | ck_rwlock.h | 36 unsigned int writer; member 47 rw->writer = 0; in ck_rwlock_init() 58 ck_pr_store_uint(&rw->writer, 0); in ck_rwlock_write_unlock() 67 r = ck_pr_load_uint(&rw->writer); in ck_rwlock_locked_writer() 87 ck_pr_load_uint(&rw->writer); in ck_rwlock_locked() 96 if (ck_pr_fas_uint(&rw->writer, 1) != 0) in ck_rwlock_write_trylock() 117 while (ck_pr_fas_uint(&rw->writer, 1) != 0) in CK_ELIDE_TRYLOCK_PROTOTYPE() 137 if (ck_pr_load_uint(&rw->writer) != 0) in CK_ELIDE_PROTOTYPE() 148 if (ck_pr_load_uint(&rw->writer) == 0) { in CK_ELIDE_PROTOTYPE() 165 while (ck_pr_load_uint(&rw->writer) != 0) in CK_ELIDE_TRYLOCK_PROTOTYPE() [all …]
|
H A D | ck_brlock.h | 58 unsigned int writer; member 69 br->writer = false; in ck_brlock_init() 83 while (ck_pr_fas_uint(&br->writer, true) == true) in ck_brlock_write_lock() 88 /* The reader list is protected under the writer br. */ in ck_brlock_write_lock() 103 ck_pr_store_uint(&br->writer, false); in ck_brlock_write_unlock() 113 while (ck_pr_fas_uint(&br->writer, true) == true) { in ck_brlock_write_trylock() 188 while (ck_pr_load_uint(&br->writer) == true) in ck_brlock_read_lock() 196 * writer. in ck_brlock_read_lock() 204 * writer. in ck_brlock_read_lock() 209 if (ck_pr_load_uint(&br->writer) == false) in ck_brlock_read_lock() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/DebugInfo/PDB/Native/ |
H A D | PDBStringTableBuilder.cpp | 155 Error PDBStringTableBuilder::writeHeader(BinaryStreamWriter &Writer) const { in writeHeader() 161 if (auto EC = Writer.writeObject(H)) in writeHeader() 163 assert(Writer.bytesRemaining() == 0); in writeHeader() 167 Error PDBStringTableBuilder::writeStrings(BinaryStreamWriter &Writer) const { in writeStrings() 168 if (auto EC = Strings.commit(Writer)) in writeStrings() 171 assert(Writer.bytesRemaining() == 0); in writeStrings() 175 Error PDBStringTableBuilder::writeHashTable(BinaryStreamWriter &Writer) const { in writeHashTable() 178 if (auto EC = Writer.writeInteger(BucketCount)) in writeHashTable() 196 if (auto EC = Writer.writeArray(ArrayRef<ulittle32_t>(Buckets))) in writeHashTable() 199 assert(Writer in writeHashTable() [all...] |
H A D | DbiStreamBuilder.cpp | 92 DbgStreams[(int)Type]->WriteFn = [Data](BinaryStreamWriter &Writer) { in addDbgStream() 93 return Writer.writeArray(Data); in addDbgStream() 294 [this](BinaryStreamWriter &Writer) { in finalizeMsfLayout() 295 return NewFpoData->commit(Writer); in finalizeMsfLayout() 304 [this](BinaryStreamWriter &Writer) { in finalizeMsfLayout() 305 return Writer.writeArray(ArrayRef(OldFpoData)); in finalizeMsfLayout() 392 BinaryStreamWriter Writer(*DbiS); in commit() 393 if (auto EC = Writer.writeObject(*Header)) in commit() 397 if (auto EC = M->commit(Writer)) in commit() 409 if (auto EC = Writer in commit() 91 __anon1d60072f0102(BinaryStreamWriter &Writer) addDbgStream() argument 293 __anon1d60072f0202(BinaryStreamWriter &Writer) finalizeMsfLayout() argument 303 __anon1d60072f0302(BinaryStreamWriter &Writer) finalizeMsfLayout() argument 390 BinaryStreamWriter Writer(*DbiS); commit() local [all...] |
/freebsd/contrib/llvm-project/llvm/lib/Target/ARM/MCTargetDesc/ |
H A D | ARMMachObjectWriter.cpp | 1 //===-- ARMMachObjectWriter.cpp - ARM Mach Object Writer ------------------===// 29 void recordARMScatteredRelocation(MachObjectWriter *Writer, 35 void recordARMScatteredHalfRelocation(MachObjectWriter *Writer, 41 bool requiresExternRelocation(MachObjectWriter *Writer, 50 void recordRelocation(MachObjectWriter *Writer, MCAssembler &Asm, 134 MachObjectWriter *Writer, const MCAssembler &Asm, in recordARMScatteredHalfRelocation() argument 147 unsigned IsPCRel = Writer->isFixupKindPCRel(Asm, Fixup.getKind()); in recordARMScatteredHalfRelocation() 160 uint32_t Value = Writer->getSymbolAddress(*A, Asm); in recordARMScatteredHalfRelocation() 162 uint64_t SecAddr = Writer->getSectionAddress(A->getFragment()->getParent()); in recordARMScatteredHalfRelocation() 177 Value2 = Writer->getSymbolAddress(B->getSymbol(), Asm); in recordARMScatteredHalfRelocation() [all …]
|
/freebsd/contrib/llvm-project/llvm/tools/llvm-readobj/ |
H A D | COFFImportDumper.cpp | 23 void dumpCOFFImportFile(const COFFImportFile *File, ScopedPrinter &Writer) { in dumpCOFFImportFile() argument 24 Writer.startLine() << '\n'; in dumpCOFFImportFile() 25 Writer.printString("File", File->getFileName()); in dumpCOFFImportFile() 26 Writer.printString("Format", File->getFileFormatName()); in dumpCOFFImportFile() 30 case COFF::IMPORT_CODE: Writer.printString("Type", "code"); break; in dumpCOFFImportFile() 31 case COFF::IMPORT_DATA: Writer.printString("Type", "data"); break; in dumpCOFFImportFile() 32 case COFF::IMPORT_CONST: Writer.printString("Type", "const"); break; in dumpCOFFImportFile() 37 Writer.printString("Name type", "ordinal"); in dumpCOFFImportFile() 40 Writer.printString("Name type", "name"); in dumpCOFFImportFile() 43 Writer in dumpCOFFImportFile() [all...] |
H A D | llvm-readobj.cpp | 342 createDumper(const ObjectFile &Obj, ScopedPrinter &Writer) { in createDumper() argument 344 return createCOFFDumper(*COFFObj, Writer); in createDumper() 347 return createELFDumper(*ELFObj, Writer); in createDumper() 350 return createMachODumper(*MachOObj, Writer); in createDumper() 353 return createWasmDumper(*WasmObj, Writer); in createDumper() 356 return createXCOFFDumper(*XObj, Writer); in createDumper() 363 static void dumpObject(ObjectFile &Obj, ScopedPrinter &Writer, in dumpObject() argument 376 Expected<std::unique_ptr<ObjDumper>> DumperOrErr = createDumper(Obj, Writer); in dumpObject() 544 static void dumpArchive(const Archive *Arc, ScopedPrinter &Writer) { in dumpArchive() argument 556 dumpObject(*Obj, Writer, Arc); in dumpArchive() [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/BinaryFormat/ |
H A D | MsgPackWriter.h | 1 //===- MsgPackWriter.h - Simple MsgPack writer ------------------*- C++ -*-===// 10 /// This file contains a MessagePack writer. 18 /// msgpack::Writer MPWriter(output); 41 class Writer { 43 /// Construct a writer, optionally enabling "Compatibility Mode" as defined 46 /// When in \p Compatible mode, the writer will write \c Str16 formats 51 Writer(raw_ostream &OS, bool Compatible = false); 53 Writer(const Writer &) = delete; 54 Writer &operator=(const Writer &) = delete; 124 support::endian::Writer EW;
|
/freebsd/contrib/llvm-project/llvm/tools/llvm-xray/ |
H A D | xray-converter.cpp | 107 support::endian::Writer Writer(OS, llvm::endianness::little); in exportAsRAWv1() local 109 Writer.write(FH.Version); in exportAsRAWv1() 110 Writer.write(FH.Type); in exportAsRAWv1() 116 Writer.write(Bitfield); in exportAsRAWv1() 117 Writer.write(FH.CycleFrequency); in exportAsRAWv1() 121 Writer.write(Padding4B); in exportAsRAWv1() 122 Writer.write(Padding4B); in exportAsRAWv1() 123 Writer.write(Padding4B); in exportAsRAWv1() 124 Writer in exportAsRAWv1() [all...] |
/freebsd/contrib/llvm-project/llvm/lib/ProfileData/ |
H A D | PGOCtxProfWriter.cpp | 1 //===- PGOCtxProfWriter.cpp - Contextual Instrumentation profile writer ---===// 20 Writer.EmitCode(bitc::UNABBREV_RECORD); in writeCounters() 21 Writer.EmitVBR(PGOCtxProfileRecords::Counters, VBREncodingBits); in writeCounters() 22 Writer.EmitVBR(Node.counters_size(), VBREncodingBits); in writeCounters() 24 Writer.EmitVBR64(Node.counters()[I], VBREncodingBits); in writeCounters() 33 Writer.EnterSubblock(PGOCtxProfileBlockIDs::ContextNodeBlockID, CodeLen); in writeImpl() 34 Writer.EmitRecord(PGOCtxProfileRecords::Guid, in writeImpl() 37 Writer.EmitRecord(PGOCtxProfileRecords::CalleeIndex, in writeImpl() 44 Writer.ExitBlock(); in writeImpl()
|
/freebsd/contrib/llvm-project/clang/include/clang/Serialization/ |
H A D | ASTRecordWriter.h | 33 ASTWriter *Writer; variable 64 : DataStreamBasicWriter(W.getASTContext()), Writer(&W), Record(&Record) {} in ASTRecordWriter() 69 : DataStreamBasicWriter(Parent.getASTContext()), Writer(Parent.Writer), in ASTRecordWriter() 95 uint64_t Offset = Writer->Stream.GetCurrentBitNo(); 97 Writer->Stream.EmitRecord(Code, *Record, Abbrev); 105 PrepareToEmit(Writer->Stream.GetCurrentBitNo()); 106 Writer->Stream.EmitRecord(Code, *Record, Abbrev); 107 return Writer->Stream.GetCurrentBitNo(); 140 return Writer->AddSourceLocation(Loc, *Record, Seq); 153 return Writer->AddSourceRange(Range, *Record, Seq); [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/DebugInfo/CodeView/ |
H A D | SimpleTypeSerializer.cpp | 18 static void addPadding(BinaryStreamWriter &Writer) { in addPadding() argument 19 uint32_t Align = Writer.getOffset() % 4; in addPadding() 26 cantFail(Writer.writeInteger(Pad)); in addPadding() 37 BinaryStreamWriter Writer(ScratchBuffer, llvm::endianness::little); in serialize() local 38 TypeRecordMapping Mapping(Writer); in serialize() 42 cantFail(Writer.writeObject(DummyPrefix)); in serialize() 51 addPadding(Writer); in serialize() 55 Prefix->RecordLen = Writer.getOffset() - sizeof(uint16_t); in serialize() 57 return {ScratchBuffer.data(), static_cast<size_t>(Writer.getOffset())}; in serialize()
|
H A D | CodeViewRecordIO.cpp | 85 return Writer->padToAlignment(Align); in padToAlignment() 110 if (auto EC = Writer->writeBytes(Bytes)) in mapByteVectorTail() 140 if (auto EC = Writer->writeInteger(TypeInd.getIndex())) in mapInteger() 219 if (auto EC = Writer->writeCString(S)) in mapStringZ() 244 if (auto EC = Writer->writeBytes(Guid.Guid)) in mapGuid() 342 if (auto EC = Writer->writeInteger<int16_t>(Value)) in writeEncodedSignedInteger() 346 if (auto EC = Writer->writeInteger<uint16_t>(LF_CHAR)) in writeEncodedSignedInteger() 348 if (auto EC = Writer->writeInteger<int8_t>(Value)) in writeEncodedSignedInteger() 352 if (auto EC = Writer->writeInteger<uint16_t>(LF_SHORT)) in writeEncodedSignedInteger() 354 if (auto EC = Writer->writeInteger<int16_t>(Value)) in writeEncodedSignedInteger() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/BinaryFormat/ |
H A D | MsgPackWriter.cpp | 1 //===- MsgPackWriter.cpp - Simple MsgPack writer ----------------*- C++ -*-===// 10 /// This file implements a MessagePack writer. 22 Writer::Writer(raw_ostream &OS, bool Compatible) in Writer() function in Writer 25 void Writer::writeNil() { EW.write(FirstByte::Nil); } in writeNil() 27 void Writer::write(bool b) { EW.write(b ? FirstByte::True : FirstByte::False); } in write() 29 void Writer::write(int64_t i) { in write() 62 void Writer::write(uint64_t u) { in write() 90 void Writer::write(double d) { in write() 103 void Writer::write(StringRef s) { in write() 123 void Writer::write(MemoryBufferRef Buffer) { in write() [all …]
|
/freebsd/contrib/libarchive/libarchive/ |
H A D | archive_write_set_format_xar.c | 65 * libarchive format writer, we should not use it; if it is needed, we 810 xmlwrite_string_attr(struct archive_write *a, xmlTextWriterPtr writer, in xmlwrite_string_attr() argument 816 r = xmlTextWriterStartElement(writer, BAD_CAST_CONST(key)); in xmlwrite_string_attr() 824 r = xmlTextWriterWriteAttribute(writer, in xmlwrite_string_attr() 834 r = xmlTextWriterWriteString(writer, BAD_CAST_CONST(value)); in xmlwrite_string_attr() 842 r = xmlTextWriterEndElement(writer); in xmlwrite_string_attr() 853 xmlwrite_string(struct archive_write *a, xmlTextWriterPtr writer, in xmlwrite_string() argument 861 r = xmlTextWriterStartElement(writer, BAD_CAST_CONST(key)); in xmlwrite_string() 869 r = xmlTextWriterWriteString(writer, BAD_CAST_CONST(value)); in xmlwrite_string() 877 r = xmlTextWriterEndElement(writer); in xmlwrite_string() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/profile/ |
H A D | InstrProfilingWriter.c | 35 /* The buffer writer is responsible in keeping writer state 217 static int writeValueProfData(ProfDataWriter *Writer, in writeValueProfData() argument 227 BufferIO = lprofCreateBufferIO(Writer); in writeValueProfData() 241 COMPILER_RT_VISIBILITY int lprofWriteData(ProfDataWriter *Writer, in lprofWriteData() argument 257 return lprofWriteDataImpl(Writer, DataBegin, DataEnd, CountersBegin, in lprofWriteData() 264 lprofWriteDataImpl(ProfDataWriter *Writer, const __llvm_profile_data *DataBegin, in lprofWriteDataImpl() argument 327 if (Writer->Write(Writer, IOVec, sizeof(IOVec) / sizeof(*IOVec))) in lprofWriteDataImpl() 331 if (__llvm_write_binary_ids(Writer) == -1) in lprofWriteDataImpl() 348 if (Writer->Write(Writer, IOVecData, sizeof(IOVecData) / sizeof(*IOVecData))) in lprofWriteDataImpl() 357 return writeValueProfData(Writer, VPDataReader, DataBegin, DataEnd); in lprofWriteDataImpl() [all …]
|
H A D | InstrProfilingInternal.h | 46 * low level writer callback function. 49 * 0, the write is skipped (the writer simply advances ElmSize*NumElm bytes). 106 * through the low level writer callback. 111 * callback by other high level writer methods such as buffered IO writer 112 * and profile data writer. */ 153 int lprofWriteData(ProfDataWriter *Writer, VPDataReaderType *VPDataReader, 155 int lprofWriteDataImpl(ProfDataWriter *Writer, 202 * Write binary ids into profiles if writer is given. 205 int __llvm_write_binary_ids(ProfDataWriter *Writer); 211 int lprofWriteOneBinaryId(ProfDataWriter *Writer, uint64_t BinaryIdLen,
|
H A D | InstrProfilingPlatformLinux.c | 130 static int WriteBinaryIdForNote(ProfDataWriter *Writer, in WriteBinaryIdForNote() argument 140 if (Writer != NULL && in WriteBinaryIdForNote() 141 lprofWriteOneBinaryId(Writer, BinaryIdLen, BinaryIdData, in WriteBinaryIdForNote() 153 * If writer is given, write binary ids into profiles. 156 static int WriteBinaryIds(ProfDataWriter *Writer, const ElfW(Nhdr) * Note, in WriteBinaryIds() argument 160 int OneBinaryIdSize = WriteBinaryIdForNote(Writer, Note); in WriteBinaryIds() 175 * Write binary ids into profiles if writer is given. 179 COMPILER_RT_VISIBILITY int __llvm_write_binary_ids(ProfDataWriter *Writer) { in __llvm_write_binary_ids() argument 217 int BinaryIdsSize = WriteBinaryIds(Writer, Note, NotesEnd); in __llvm_write_binary_ids() 231 COMPILER_RT_VISIBILITY int __llvm_write_binary_ids(ProfDataWriter *Writer) { in __llvm_write_binary_ids() argument
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/MCTargetDesc/ |
H A D | AArch64MachObjectWriter.cpp | 1 //===-- AArch64MachObjectWriter.cpp - ARM Mach Object Writer --------------===// 43 void recordRelocation(MachObjectWriter *Writer, MCAssembler &Asm, 149 MachObjectWriter *Writer, MCAssembler &Asm, const MCFragment *Fragment, in recordRelocation() argument 151 unsigned IsPCRel = Writer->isFixupKindPCRel(Asm, Fixup.getKind()); in recordRelocation() 217 const MCSymbol *A_Base = Writer->getAtom(*A); in recordRelocation() 220 const MCSymbol *B_Base = Writer->getAtom(*B); in recordRelocation() 235 Writer->addRelocation(A_Base, Fragment->getParent(), MRE); in recordRelocation() 280 Value += (!A->getFragment() ? 0 : Writer->getSymbolAddress(*A, Asm)) - in recordRelocation() 283 : Writer->getSymbolAddress(*A_Base, Asm)); in recordRelocation() 284 Value -= (!B->getFragment() ? 0 : Writer->getSymbolAddress(*B, Asm)) - in recordRelocation() [all …]
|
/freebsd/tools/test/stress2/misc/ |
H A D | sendfile26.sh | 137 printf("Writer: opening %s\n", FILENAME); 140 perror("Writer: failed to open file"); 149 "Writer: writing chunks of %u bytes to a max of %u bytes\n", 155 perror("Writer: failed to write file"); 163 printf("Writer: closing %s\n", FILENAME); 175 printf("Writer: opening %s\n", FILENAME); 214 pthread_t writer; 226 * written many times to a file by the writer thread (see below). */ 238 * writer thread to a local TCP port. The goal is always try to send 246 /* The writer thread is responsible for writing the allocated buffer to [all …]
|
/freebsd/contrib/ntp/libntp/lib/isc/ |
H A D | task.c | 1735 isc_taskmgr_renderxml(isc_taskmgr_t *mgr0, xmlTextWriterPtr writer) { in isc_taskmgr_renderxml() argument 1745 xmlTextWriterStartElement(writer, ISC_XMLCHAR "thread-model"); in isc_taskmgr_renderxml() 1747 xmlTextWriterStartElement(writer, ISC_XMLCHAR "type"); in isc_taskmgr_renderxml() 1748 xmlTextWriterWriteString(writer, ISC_XMLCHAR "threaded"); in isc_taskmgr_renderxml() 1749 xmlTextWriterEndElement(writer); /* type */ in isc_taskmgr_renderxml() 1751 xmlTextWriterStartElement(writer, ISC_XMLCHAR "worker-threads"); in isc_taskmgr_renderxml() 1752 xmlTextWriterWriteFormatString(writer, "%d", mgr->workers); in isc_taskmgr_renderxml() 1753 xmlTextWriterEndElement(writer); /* worker-threads */ in isc_taskmgr_renderxml() 1755 xmlTextWriterStartElement(writer, ISC_XMLCHAR "type"); in isc_taskmgr_renderxml() 1756 xmlTextWriterWriteString(writer, ISC_XMLCHAR "non-threaded"); in isc_taskmgr_renderxml() [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/DebugInfo/CodeView/ |
H A D | CodeViewRecordIO.h | 46 return Writer->getOffset(); in getCurrentOffset() 58 explicit CodeViewRecordIO(BinaryStreamWriter &Writer) : Writer(&Writer) {} in CodeViewRecordIO() argument 70 return (Streamer != nullptr) && (Reader == nullptr) && (Writer == nullptr); in isStreaming() 73 return (Reader != nullptr) && (Streamer == nullptr) && (Writer == nullptr); in isReading() 76 return (Writer != nullptr) && (Streamer == nullptr) && (Reader == nullptr); in isWriting() 91 return Writer->writeObject(Value); in mapObject() 109 return Writer->writeInteger(Value); 158 if (auto EC = Writer->writeInteger(Size)) 263 BinaryStreamWriter *Writer = nullptr; variable
|
/freebsd/share/man/man9/ |
H A D | rwlock.9 | 48 .Nd kernel reader/writer lock 92 Reader/writer locks allow shared access to protected data by multiple threads, 98 .Em writer 101 Although reader/writer locks look very similar to 104 Reader/writer locks can be treated as mutexes (see 127 as reader/writer lock, described by name 183 as a writer. 201 as a writer. 330 Reader/writer is a bit of an awkward name.
|