Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename crsttypes.h to have _generated suffix
  • Loading branch information
AaronRobinsonMSFT committed Oct 3, 2022
commit 63578fcc7bf6dcb2e2831d0da69a1878e55e5693
6 changes: 3 additions & 3 deletions src/coreclr/inc/CrstTypeTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ public static int Main()
{
// Calculate the filenames of the input and output files.
string inputFile = "CrstTypes.def";
string outputFile = "crsttypes.h";
string outputFile = "crsttypes_generated.h";

// A common error is to forget to check out the CrstTypes.h file first. Handle this case specially
// A common error is to forget to check out the crsttypes_generated.h file first. Handle this case specially
// so we can give a good error message.
if (File.Exists(outputFile) && (File.GetAttributes(outputFile) & FileAttributes.ReadOnly) != 0)
{
Expand Down Expand Up @@ -113,7 +113,7 @@ public static int Main()
}
}

// Emit the CrstTypes.h output file.
// Emit the crsttypes_generated.h output file.
void WriteHeaderFile(string fileName)
{
FileStream stream = new FileStream(fileName, FileMode.Create, FileAccess.Write, FileShare.None);
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/inc/CrstTypes.def
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// acquired and which other types may be subsequently acquired. You can then add a Crst definition to this
// file and annotate it with those dependencies. Running CrstTypeTool will check to see if this introduces a
// potential deadlock problem and if everything checks out will generate a new version of
// file:CrstTypes.h (be sure to check this file out from TFS/SD before running CrstTypeTool).
// file:crsttypes_generated.h.
//
// The format of this file is a very simple language. Comments are introduced with '//' and continue to the
// end of the line. Keywords are case insensitive (Crst type names, however, are case sensitive since they'll
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/inc/clrhost.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ extern int RFS_HashStack();
// Critical section support for CLR DLLs other than the EE.
// Include the header defining each Crst type and its corresponding level (relative rank). This is
// auto-generated from a tool that takes a high-level description of each Crst type and its dependencies.
#include "crsttypes.h"
#include "crsttypes_generated.h"

// critical section api
CRITSEC_COOKIE ClrCreateCriticalSection(CrstType type, CrstFlags flags);
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/coreclr/vm/crst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "threadsuspend.h"

#define __IN_CRST_CPP
#include <crsttypes.h>
#include <crsttypes_generated.h>
#undef __IN_CRST_CPP

#if defined(DACCESS_COMPILE) && defined(TARGET_UNIX) && !defined(CROSS_COMPILE)
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/crst.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
// Crst *pcrst = new Crst(type);
//
// where "type" is one of the enums created in the auto-generated
// file:..\inc\CrstTypes.h header file (matching the definition in
// file:..\inc\crsttypes_generated.h header file (matching the definition in
// file:..\inc\CrstTypes.def).
//
// By default, crsts don't support nested enters by the same thread. If
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/inlinetracking.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "corhdr.h"
#include "shash.h"
#include "sarray.h"
#include "crsttypes.h"
#include "crsttypes_generated.h"
#include "daccess.h"
#include "crossloaderallocatorhash.h"

Expand Down