Skip to content

Commit f225b51

Browse files
US1907300 - add md code escapes to code elements - PR21 (#4158)
* US1907300 - add md code escapes to code elements - PR21 * changes after review
1 parent f57b03e commit f225b51

10 files changed

+793
-802
lines changed

docs/c-runtime-library/reference/endthread-endthreadex.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["_endthread", "endthreadex", "_endthreadex", "endthread"]
1010
helpviewer_keywords: ["_endthread function", "endthread function", "terminating threads", "endthreadex function", "_endthreadex function", "threading [C++], terminating threads"]
11-
ms.assetid: 18a91f2f-659e-40b4-b266-ec12dcf2abf5
1211
---
13-
# _endthread, _endthreadex
12+
# `_endthread`, `_endthreadex`
1413

15-
Terminates a thread; **_endthread** terminates a thread that's created by **_beginthread** and **_endthreadex** terminates a thread that's created by **_beginthreadex**.
14+
Terminates a thread; **`_endthread`** terminates a thread that's created by **`_beginthread`** and **`_endthreadex`** terminates a thread that's created by **`_beginthreadex`**.
1615

1716
## Syntax
1817

@@ -25,31 +24,31 @@ void _endthreadex(
2524

2625
### Parameters
2726

28-
*retval*<br/>
27+
*`retval`*\
2928
Thread exit code.
3029

3130
## Remarks
3231

33-
You can call **_endthread** or **_endthreadex** explicitly to terminate a thread; however, **_endthread** or **_endthreadex** is called automatically when the thread returns from the routine passed as a parameter to **_beginthread** or **_beginthreadex**. Terminating a thread with a call to **endthread** or **_endthreadex** helps ensure proper recovery of resources allocated for the thread.
32+
You can call **`_endthread`** or **`_endthreadex`** explicitly to terminate a thread; however, **`_endthread`** or **`_endthreadex`** is called automatically when the thread returns from the routine passed as a parameter to **`_beginthread`** or **`_beginthreadex`**. Terminating a thread with a call to **`endthread`** or **`_endthreadex`** helps ensure proper recovery of resources allocated for the thread.
3433

3534
> [!NOTE]
36-
> For an executable file linked with Libcmt.lib, do not call the Win32 [ExitThread](/windows/win32/api/processthreadsapi/nf-processthreadsapi-exitthread) API; this prevents the run-time system from reclaiming allocated resources. **_endthread** and **_endthreadex** reclaim allocated thread resources and then call **ExitThread**.
35+
> For an executable file linked with Libcmt.lib, do not call the Win32 [`ExitThread`](/windows/win32/api/processthreadsapi/nf-processthreadsapi-exitthread) API; this prevents the run-time system from reclaiming allocated resources. **`_endthread`** and **`_endthreadex`** reclaim allocated thread resources and then call **`ExitThread`**.
3736
38-
**_endthread** automatically closes the thread handle. (This behavior differs from the Win32 **ExitThread** API.) Therefore, when you use **_beginthread** and **_endthread**, do not explicitly close the thread handle by calling the Win32 [CloseHandle](/windows/win32/api/handleapi/nf-handleapi-closehandle) API.
37+
**`_endthread`** automatically closes the thread handle. (This behavior differs from the Win32 **`ExitThread`** API.) Therefore, when you use **`_beginthread`** and **`_endthread`**, don't explicitly close the thread handle by calling the Win32 [`CloseHandle`](/windows/win32/api/handleapi/nf-handleapi-closehandle) API.
3938

40-
Like the Win32 **ExitThread** API, **_endthreadex** does not close the thread handle. Therefore, when you use **_beginthreadex** and **_endthreadex**, you must close the thread handle by calling the Win32 **CloseHandle** API.
39+
Like the Win32 **`ExitThread`** API, **`_endthreadex`** doesn't close the thread handle. Therefore, when you use **`_beginthreadex`** and **`_endthreadex`**, you must close the thread handle by calling the Win32 **`CloseHandle`** API.
4140

4241
> [!NOTE]
43-
> **_endthread** and **_endthreadex** cause C++ destructors pending in the thread not to be called.
42+
> **`_endthread`** and **`_endthreadex`** cause C++ destructors pending in the thread not to be called.
4443
4544
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
4645

4746
## Requirements
4847

4948
|Function|Required header|
5049
|--------------|---------------------|
51-
|**_endthread**|\<process.h>|
52-
|**_endthreadex**|\<process.h>|
50+
|**`_endthread`**|`<process.h>`|
51+
|**`_endthreadex`**|`<process.h>`|
5352

5453
For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
5554

@@ -59,9 +58,9 @@ Multithreaded versions of the [C run-time libraries](../../c-runtime-library/crt
5958

6059
## Example
6160

62-
See the example for [_beginthread](beginthread-beginthreadex.md).
61+
See the example for [`_beginthread`](beginthread-beginthreadex.md).
6362

6463
## See also
6564

66-
[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)<br/>
67-
[_beginthread, _beginthreadex](beginthread-beginthreadex.md)<br/>
65+
[Process and Environment Control](../../c-runtime-library/process-and-environment-control.md)\
66+
[`_beginthread`, `_beginthreadex`](beginthread-beginthreadex.md)

docs/c-runtime-library/reference/fstat-fstat32-fstat64-fstati64-fstat32i64-fstat64i32.md

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["_fstat32i64", "fstat", "fstat64i32", "_fstat64", "_fstati64", "fstat64", "_fstat32", "fstat32i64", "fstati64", "_fstat", "fstat32", "_fstat64i32"]
1010
helpviewer_keywords: ["_fstat64 function", "fstati64 function", "_fstat64i32 function", "_fstat32i64 function", "_fstat32 function", "file information", "fstat64i32 function", "fstat32 function", "fstat function", "fstat64 function", "_fstat function", "_fstati64 function", "fstat32i64 function"]
11-
ms.assetid: 088f5e7a-9636-4cf7-ab8e-e28d2aa4280a
1211
---
13-
# _fstat, _fstat32, _fstat64, _fstati64, _fstat32i64, _fstat64i32
12+
# `_fstat`, `_fstat32`, `_fstat64`, `_fstati64`, `_fstat32i64`, `_fstat64i32`
1413

1514
Gets information about an open file.
1615

@@ -45,66 +44,66 @@ int _fstat64i32(
4544

4645
### Parameters
4746

48-
*fd*<br/>
47+
*`fd`*\
4948
File descriptor of the open file.
5049

51-
*buffer*<br/>
50+
*`buffer`*\
5251
Pointer to the structure to store results.
5352

5453
## Return Value
5554

56-
Returns 0 if the file-status information is obtained. A return value of -1 indicates an error. If the file descriptor is invalid or *buffer* is **NULL**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **errno** is set to **EBADF**, in the case of an invalid file descriptor, or to **EINVAL**, if *buffer* is **NULL**.
55+
Returns 0 if the file-status information is obtained. A return value of -1 indicates an error. If the file descriptor is invalid or *`buffer`* is **`NULL`**, the invalid parameter handler is invoked, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, **`errno`** is set to **`EBADF`**, in the case of an invalid file descriptor, or to **`EINVAL`**, if *`buffer`* is **`NULL`**.
5756

5857
## Remarks
5958

60-
The **_fstat** function obtains information about the open file associated with *fd* and stores it in the structure pointed to by *buffer*. The **_stat** structure, defined in SYS\Stat.h, contains the following fields.
59+
The **`_fstat`** function obtains information about the open file associated with *`fd`* and stores it in the structure pointed to by *`buffer`*. The **`_stat`** structure, defined in `SYS\Stat.h`, contains the following fields.
6160

6261
|Field|Meaning|
6362
|-|-|
64-
| **st_atime** | Time of the last file access. |
65-
| **st_ctime** | Time of the creation of the file. |
66-
| **st_dev** | If a device, *fd*; otherwise 0. |
67-
| **st_mode** | Bit mask for file-mode information. The **_S_IFCHR** bit is set if *fd* refers to a device. The **_S_IFREG** bit is set if *fd* refers to an ordinary file. The read/write bits are set according to the file's permission mode. **_S_IFCHR** and other constants are defined in SYS\Stat.h. |
68-
| **st_mtime** | Time of the last modification of the file. |
69-
| **st_nlink** | Always 1 on non-NTFS file systems. |
70-
| **st_rdev** | If a device, *fd*; otherwise 0. |
71-
| **st_size** | Size of the file in bytes. |
63+
| **`st_atime`** | Time of the last file access. |
64+
| **`st_ctime`** | Time of the creation of the file. |
65+
| **`st_dev`** | If a device, *`fd`*; otherwise 0. |
66+
| **`st_mode`** | Bit mask for file-mode information. The **`_S_IFCHR`** bit is set if *`fd`* refers to a device. The **`_S_IFREG`** bit is set if *`fd`* refers to an ordinary file. The read/write bits are set according to the file's permission mode. **`_S_IFCHR`** and other constants are defined in `SYS\Stat.h`. |
67+
| **`st_mtime`** | Time of the last modification of the file. |
68+
| **`st_nlink`** | Always 1 on non-NTFS file systems. |
69+
| **`st_rdev`** | If a device, *`fd`*; otherwise 0. |
70+
| **`st_size`** | Size of the file in bytes. |
7271

73-
If *fd* refers to a device, the **st_atime**, **st_ctime**, **st_mtime**, and **st_size** fields are not meaningful.
72+
If *`fd`* refers to a device, the **`st_atime`**, **`st_ctime`**, **`st_mtime`**, and **`st_size`** fields aren't meaningful.
7473

75-
Because Stat.h uses the [_dev_t](../../c-runtime-library/standard-types.md) type, which is defined in Types.h, you must include Types.h before Stat.h in your code.
74+
Because `Stat.h` uses the [`_dev_t`](../../c-runtime-library/standard-types.md) type, which is defined in `Types.h`, you must include `Types.h` before `Stat.h` in your code.
7675

77-
**_fstat64**, which uses the **__stat64** structure, allows file-creation dates to be expressed up through 23:59:59, December 31, 3000, UTC; whereas the other functions only represent dates through 23:59:59 January 18, 2038, UTC. Midnight, January 1, 1970, is the lower bound of the date range for all these functions.
76+
**`_fstat64`**, which uses the **`__stat64`** structure, allows file-creation dates to be expressed up through 23:59:59, December 31, 3000, UTC; whereas the other functions only represent dates through 23:59:59 January 18, 2038, UTC. Midnight, January 1, 1970, is the lower bound of the date range for all these functions.
7877

79-
Variations of these functions support 32-bit or 64-bit time types and 32-bit or 64-bit file lengths. The first numerical suffix (**32** or **64**) indicates the size of the time type used; the second suffix is either **i32** or **i64**, indicating whether the file size is represented as a 32-bit or 64-bit integer.
78+
Variations of these functions support 32-bit or 64-bit time types and 32-bit or 64-bit file lengths. The first numerical suffix (**32** or **64**) indicates the size of the time type used; the second suffix is either **`i32`** or **`i64`**, indicating whether the file size is represented as a 32-bit or 64-bit integer.
8079

81-
**_fstat** is equivalent to **_fstat64i32**, and **`struct`** **_stat** contains a 64-bit time. This is true unless **_USE_32BIT_TIME_T** is defined, in which case the old behavior is in effect; **_fstat** uses a 32-bit time, and **`struct`** **_stat** contains a 32-bit time. The same is true for **_fstati64**.
80+
**`_fstat`** is equivalent to **`_fstat64i32`**, and **`struct`** **`_stat`** contains a 64-bit time. This is true unless **`_USE_32BIT_TIME_T`** is defined, in which case the old behavior is in effect; **`_fstat`** uses a 32-bit time, and **`struct`** **`_stat`** contains a 32-bit time. The same is true for **`_fstati64`**.
8281

8382
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
8483

85-
### Time Type and File Length Type Variations of _stat
84+
### Time Type and File Length Type Variations of `_stat`
8685

87-
|Functions|_USE_32BIT_TIME_T defined?|Time type|File length type|
86+
|Functions|`_USE_32BIT_TIME_T` defined?|Time type|File length type|
8887
|---------------|------------------------------------|---------------|----------------------|
89-
|**_fstat**|Not defined|64-bit|32-bit|
90-
|**_fstat**|Defined|32-bit|32-bit|
91-
|**_fstat32**|Not affected by the macro definition|32-bit|32-bit|
92-
|**_fstat64**|Not affected by the macro definition|64-bit|64-bit|
93-
|**_fstati64**|Not defined|64-bit|64-bit|
94-
|**_fstati64**|Defined|32-bit|64-bit|
95-
|**_fstat32i64**|Not affected by the macro definition|32-bit|64-bit|
96-
|**_fstat64i32**|Not affected by the macro definition|64-bit|32-bit|
88+
|**`_fstat`**|Not defined|64-bit|32-bit|
89+
|**`_fstat`**|Defined|32-bit|32-bit|
90+
|**`_fstat32`**|Not affected by the macro definition|32-bit|32-bit|
91+
|**`_fstat64`**|Not affected by the macro definition|64-bit|64-bit|
92+
|**`_fstati64`**|Not defined|64-bit|64-bit|
93+
|**`_fstati64`**|Defined|32-bit|64-bit|
94+
|**`_fstat32i64`**|Not affected by the macro definition|32-bit|64-bit|
95+
|**`_fstat64i32`**|Not affected by the macro definition|64-bit|32-bit|
9796

9897
## Requirements
9998

10099
|Function|Required header|
101100
|--------------|---------------------|
102-
|**_fstat**|\<sys/stat.h> and \<sys/types.h>|
103-
|**_fstat32**|\<sys/stat.h> and \<sys/types.h>|
104-
|**_fstat64**|\<sys/stat.h> and \<sys/types.h>|
105-
|**_fstati64**|\<sys/stat.h> and \<sys/types.h>|
106-
|**_fstat32i64**|\<sys/stat.h> and \<sys/types.h>|
107-
|**_fstat64i32**|\<sys/stat.h> and \<sys/types.h>|
101+
|**`_fstat`**|`<sys/stat.h>` and `<sys/types.h>`|
102+
|**`_fstat32`**|`<sys/stat.h>` and `<sys/types.h>`|
103+
|**`_fstat64`**|`<sys/stat.h>` and `<sys/types.h>`|
104+
|**`_fstati64`**|`<sys/stat.h>` and `<sys/types.h>`|
105+
|**`_fstat32i64`**|`<sys/stat.h>` and `<sys/types.h>`|
106+
|**`_fstat64i32`**|`<sys/stat.h>` and `<sys/types.h>`|
108107

109108
For more compatibility information, see [Compatibility](../../c-runtime-library/compatibility.md).
110109

@@ -175,8 +174,8 @@ Time modified : Wed May 07 15:25:11 2003
175174

176175
## See also
177176

178-
[File Handling](../../c-runtime-library/file-handling.md)<br/>
179-
[_access, _waccess](access-waccess.md)<br/>
180-
[_chmod, _wchmod](chmod-wchmod.md)<br/>
181-
[_filelength, _filelengthi64](filelength-filelengthi64.md)<br/>
182-
[_stat, _wstat Functions](stat-functions.md)<br/>
177+
[File Handling](../../c-runtime-library/file-handling.md)\
178+
[`_access`, `_waccess`](access-waccess.md)\
179+
[`_chmod`, `_wchmod`](chmod-wchmod.md)\
180+
[`_filelength`, `_filelengthi64`](filelength-filelengthi64.md)\
181+
[`_stat`, `_wstat` Functions](stat-functions.md)

docs/c-runtime-library/reference/mkgmtime-mkgmtime32-mkgmtime64.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ A quantity of type **`__time32_t`** or **`__time64_t`** representing the number
4040

4141
The **`_mkgmtime32`** and **`_mkgmtime64`** functions convert a UTC time to a **`__time32_t`** or **`__time64_t`** type representing the time in UTC. To convert a local time to UTC time, use **`mktime`**, **`_mktime32`**, and **`_mktime64`** instead.
4242

43-
**_mkgmtime** is an inline function that evaluates to **`_mkgmtime64`**, and **`time_t`** is equivalent to **`__time64_t`**. If you need to force the compiler to interpret **`time_t`** as the old 32-bit **`time_t`**, you can define **`_USE_32BIT_TIME_T`**. We don't recommend it, because your application might fail after January 18, 2038, the maximum range of a 32-bit **`time_t`**. It's not allowed at all on 64-bit platforms.
43+
**`_mkgmtime`** is an inline function that evaluates to **`_mkgmtime64`**, and **`time_t`** is equivalent to **`__time64_t`**. If you need to force the compiler to interpret **`time_t`** as the old 32-bit **`time_t`**, you can define **`_USE_32BIT_TIME_T`**. We don't recommend it, because your application might fail after January 18, 2038, the maximum range of a 32-bit **`time_t`**. It's not allowed at all on 64-bit platforms.
4444

4545
The time structure passed in is changed as follows, in the same way as it's changed by the **`_mktime`** functions: the **`tm_wday`** and **`tm_yday`** fields are set to new values based on the values of **`tm_mday`** and **`tm_year`**. Because the time is assumed to be UTC, the **`tm_isdst`** field is ignored.
4646

0 commit comments

Comments
 (0)