Logo Search packages:      
Sourcecode: virtualbox-ose version File versions  Download package

RTDECL ( bool   ) 

Yields the CPU.

Returns:
true if we yielded.

false if it's probable that we didn't yield.

Checks if the specified thread is the main thread.

Returns:
true if it is, false if it isn't.
Parameters:
hThread The thread handle.
Overridable function that decides whether assertions executes the panic (breakpoint) or not.

The generic implementation will return true.

Returns:
true if the breakpoint should be hit, false if it should be ignored.
Remarks:
The RTDECL() makes this a bit difficult to override on Windows. So, you'll have to use RTASSERT_HAVE_SHOULD_PANIC or RTASSERT_HAVE_SHOULD_PANIC_PRIVATE there to control the kind of prototype.
Controls whether the assertions should be quiet or noisy (default).

Returns:
The old setting.
Parameters:
fQuiet The new setting.
Are assertions quiet or noisy?

Returns:
True if they are quiet, false if noisy.
Makes the assertions panic (default) or not.

Returns:
The old setting.
Parameters:
fPanic The new setting.
Can assertion panic.

Returns:
True if they can, false if not.
Checks if a sysfs file (or directory, device, symlink, whatever) exists.

Returns:
true / false, errno is preserved.
Parameters:
pszFormat The name format, either absolute or relative to "/sys/".
... The format args.
Checks if the thread is running in the lock validator after it has entered a block state.

Returns:
true if it is, false if it isn't.
Parameters:
hThread The thread in question.
Checks if the calling thread is holding a lock in the specified class.

Returns:
true if it holds a lock in the specific class, false if it doesn't.
Parameters:
hCurrentThread The current thread. Pass NIL_RTTHREAD if you're lazy.
hClass The class.
Checks if the calling thread is holding a lock in the specified sub-class.

Returns:
true if it holds a lock in the specific sub-class, false if it doesn't.
Parameters:
hCurrentThread The current thread. Pass NIL_RTTHREAD if you're lazy.
hClass The class.
uSubClass The new sub-class value.
Enables / disables the lock validator for new locks.

Returns:
The old setting.
Parameters:
fEnabled The new setting.
Is the lock validator enabled?

Returns:
True if enabled, false if not.
Controls whether the lock validator should be quiet or noisy (default).

Returns:
The old setting.
Parameters:
fQuiet The new setting.
Is the lock validator quiet or noisy?

Returns:
True if it is quiet, false if noisy.
Makes the lock validator panic (default) or not.

Returns:
The old setting.
Parameters:
fPanic The new setting.
Can the lock validator cause panic.

Returns:
True if it can, false if not.
Checks if a CPU is online or not.

Returns:
true/false accordingly.
Parameters:
idCpu The identifier of the CPU.
Checks if a CPU is present in the system.

Returns:
true/false accordingly.
Parameters:
idCpu The identifier of the CPU.
Checks if the path exists.

Returns:
true if it exists and false if it doesn't.
Parameters:
pszPath The path to check.
fFlags RTPATH_F_ON_LINK or RTPATH_F_FOLLOW_LINK.
Checks if a path have an extension.

Returns:
true if extension present.

false if no extension.

Parameters:
pszPath Path to check.
Checks if a path includes more than a filename.

Returns:
true if path present.

false if no path.

Parameters:
pszPath Path to check.
Checks if a path starts with the given parent path.

This means that either the path and the parent path matches completely, or that the path is to some file or directory residing in the tree given by the parent directory.

The path comparison takes platform-dependent details into account, see RTPathCompare() for details.

Returns:
|true| when pszPath starts with pszParentPath (or when they are identical), or |false| otherwise.
Parameters:
pszPath Path to check, must be an absolute path.
pszParentPath Parent path, must be an absolute path. No trailing directory slash!
Remarks:
This API doesn't currently handle root directory compares in a manner consistant with the other APIs. RTPathStartsWith(pszSomePath, "/") will not work if pszSomePath isn't "/".
Checks if the caller is the exclusive semaphore owner.

Returns:
true / false accoringly.
Parameters:
hRWSem Handle to the read/write semaphore.
Checks if the caller is one of the read owners of the sempahore.

Note:
!CAUTION! This API doesn't work reliably if lock validation isn't enabled. Meaning, the answer is not trustworhty unless RT_LOCK_STRICT or RTSEMRW_STRICT was defined at build time. Also, make sure you do not use RTSEMRW_FLAGS_NO_LOCK_VAL when creating the semaphore. And finally, if you used a locking class, don't disable deadlock detection by setting cMsMinDeadlock to RT_INDEFINITE_WAIT.
In short, only use this for assertions.

Returns:
true if reader, false if not.
Parameters:
hRWSem Handle to the read/write semaphore.
fWannaHear What you'd like to hear when lock validation is not available. (For avoiding asserting all over the place.)
Same as RTSortShell but speciallized for an array containing element pointers.

Returns:
true if it is sorted, false if it isn't.
Parameters:
papvArray The array to check.
cElements The number of elements in the array.
pfnCmp Callback function comparing two elements.
pvUser User argument for the callback.
Matches a simple string pattern, neither which needs to be zero terminated.

This is identical to RTStrSimplePatternMatch except that you can optionally specify the length of both the pattern and the string. The function will stop when it hits a string terminator or either of the lengths.

Returns:
true if the string matches the pattern, otherwise false.
Parameters:
pszPattern The pattern. Special chars are '*' and '?', where the asterisk matches zero or more characters and question mark matches exactly one character.
cchPattern The pattern length. Pass RTSTR_MAX if you don't know the length and wish to stop at the string terminator.
pszString The string to match against the pattern.
cchString The string length. Pass RTSTR_MAX if you don't know the length and wish to match up to the string terminator.
Matches multiple patterns against a string.

The patterns are separated by the pipe character (|).

Returns:
true if the string matches the pattern, otherwise false.
Parameters:
pszPatterns The patterns.
cchPatterns The lengths of the patterns to use. Pass RTSTR_MAX to stop at the terminator.
pszString The string to match against the pattern.
cchString The string length. Pass RTSTR_MAX stop stop at the terminator.
poffPattern Offset into the patterns string of the patttern that matched. If no match, this will be set to RTSTR_MAX. This is optional, NULL is fine.
Converts a string representation of a number to a 8-bit unsigned number. The base is guessed.

Returns:
8-bit unsigned number on success.

0 on failure.

Parameters:
pszValue Pointer to the string value.
Inserts a string into a unique string space.

Returns:
true on success.

false if the string collided with an existing string.

Parameters:
pStrSpace The space to insert it into.
pStr The string node.
Checks if the specified thread is the main thread.

Returns:
true if it is, false if it isn't.
Parameters:
hThread The thread handle.
Simple verficiation of an UDP packet (size + checksum).

Returns:
true if valid, false if invalid.
Parameters:
pIpHdr Pointer to the IPv4 header, in network endian (big). This is assumed to be valid and the minimum size being mapped.
pUdpHdr Pointer to the UDP header, in network endian (big).
pvData Pointer to the data, assuming it's one single segment and that cbPktMax - sizeof(RTNETUDP) is mapped here.
cbPktMax The max UDP packet size, UDP header and payload (data).
fChecksum Whether to validate the checksum (GSO).
Simple verficiation of an TCP packet (size + checksum).

Returns:
true if valid, false if invalid.
Parameters:
pIpHdr Pointer to the IPv4 header, in network endian (big). This is assumed to be valid and the minimum size being mapped.
pTcpHdr Pointer to the TCP header, in network endian (big).
cbHdrMax The max TCP header size (what pTcpHdr points to).
pvData Pointer to the data, assuming it's one single segment and that cbPktMax - sizeof(RTNETTCP) is mapped here. If NULL then we assume the data follows immediately after the TCP header.
cbPktMax The max TCP packet size, TCP header and payload (data).
fChecksum Whether to validate the checksum (GSO).
Minimal validation of a DHCP packet.

This will fail on BOOTP packets (if sufficient data is supplied). It will not verify the source and destination ports, that's the caller's responsibility.

This function will ASSUME that the hardware type is ethernet and use that for htype/hlen validation.

Returns:
true if valid, false if invalid.
Parameters:
pUdpHdr Pointer to the UDP header, in network endian (big). This is assumed to be valid and fully mapped.
pDhcp Pointer to the DHCP packet. This might not be the entire thing, see cbDhcp.
cbDhcp The number of valid bytes that pDhcp points to.
pMsgType Where to store the message type (if found). This will be set to 0 if not found and on failure.
Checks if the specified thread is one of the owners.

Returns:
true if it is, false if not.
Parameters:
pRec The validator record.
hThread The thread handle of the owner. NIL_RTTHREAD is an alias for the current thread.
Checks if the thread is running in the lock validator after it has entered a block state.

Returns:
true if it is, false if it isn't.
Parameters:
hThread The thread in question.
Checks if the calling thread is holding a lock in the specified class.

Returns:
true if it holds a lock in the specific class, false if it doesn't.
Parameters:
hCurrentThread The current thread. Pass NIL_RTTHREAD if you're lazy.
hClass The class.
Checks if the calling thread is holding a lock in the specified sub-class.

Returns:
true if it holds a lock in the specific sub-class, false if it doesn't.
Parameters:
hCurrentThread The current thread. Pass NIL_RTTHREAD if you're lazy.
hClass The class.
uSubClass The new sub-class value.
Enables / disables the lock validator for new locks.

Returns:
The old setting.
Parameters:
fEnabled The new setting.
Is the lock validator enabled?

Returns:
True if enabled, false if not.
Controls whether the lock validator should be quiet or noisy (default).

Returns:
The old setting.
Parameters:
fQuiet The new setting.
Is the lock validator quiet or noisy?

Returns:
True if it is quiet, false if noisy.
Makes the lock validator panic (default) or not.

Returns:
The old setting.
Parameters:
fPanic The new setting.
Can the lock validator cause panic.

Returns:
True if it can, false if not.
Overridable function that decides whether assertions executes the panic (breakpoint) or not.

The generic implementation will return true.

Returns:
true if the breakpoint should be hit, false if it should be ignored.
Remarks:
The RTDECL() makes this a bit difficult to override on Windows. So, you'll have to use RTASSERT_HAVE_SHOULD_PANIC or RTASSERT_HAVE_SHOULD_PANIC_PRIVATE there to control the kind of prototype.
Controls whether the assertions should be quiet or noisy (default).

Returns:
The old setting.
Parameters:
fQuiet The new setting.
Are assertions quiet or noisy?

Returns:
True if they are quiet, false if noisy.
Makes the assertions panic (default) or not.

Returns:
The old setting.
Parameters:
fPanic The new setting.
Can assertion panic.

Returns:
True if they can, false if not.
Checks if a sysfs file (or directory, device, symlink, whatever) exists.

Returns:
true / false, errno is preserved.
Parameters:
pszFormat The name format, either absolute or relative to "/sys/".
... The format args.
Checks if the thread is running in the lock validator after it has entered a block state.

Returns:
true if it is, false if it isn't.
Parameters:
hThread The thread in question.
Checks if the calling thread is holding a lock in the specified class.

Returns:
true if it holds a lock in the specific class, false if it doesn't.
Parameters:
hCurrentThread The current thread. Pass NIL_RTTHREAD if you're lazy.
hClass The class.
Checks if the calling thread is holding a lock in the specified sub-class.

Returns:
true if it holds a lock in the specific sub-class, false if it doesn't.
Parameters:
hCurrentThread The current thread. Pass NIL_RTTHREAD if you're lazy.
hClass The class.
uSubClass The new sub-class value.
Enables / disables the lock validator for new locks.

Returns:
The old setting.
Parameters:
fEnabled The new setting.
Is the lock validator enabled?

Returns:
True if enabled, false if not.
Controls whether the lock validator should be quiet or noisy (default).

Returns:
The old setting.
Parameters:
fQuiet The new setting.
Is the lock validator quiet or noisy?

Returns:
True if it is quiet, false if noisy.
Makes the lock validator panic (default) or not.

Returns:
The old setting.
Parameters:
fPanic The new setting.
Can the lock validator cause panic.

Returns:
True if it can, false if not.
Checks if a CPU is online or not.

Returns:
true/false accordingly.
Parameters:
idCpu The identifier of the CPU.
Checks if a CPU is present in the system.

Returns:
true/false accordingly.
Parameters:
idCpu The identifier of the CPU.
Checks if the path exists.

Returns:
true if it exists and false if it doesn't.
Parameters:
pszPath The path to check.
fFlags RTPATH_F_ON_LINK or RTPATH_F_FOLLOW_LINK.
Checks if a path have an extension.

Returns:
true if extension present.

false if no extension.

Parameters:
pszPath Path to check.
Checks if a path includes more than a filename.

Returns:
true if path present.

false if no path.

Parameters:
pszPath Path to check.
Checks if a path starts with the given parent path.

This means that either the path and the parent path matches completely, or that the path is to some file or directory residing in the tree given by the parent directory.

The path comparison takes platform-dependent details into account, see RTPathCompare() for details.

Returns:
|true| when pszPath starts with pszParentPath (or when they are identical), or |false| otherwise.
Parameters:
pszPath Path to check, must be an absolute path.
pszParentPath Parent path, must be an absolute path. No trailing directory slash!
Remarks:
This API doesn't currently handle root directory compares in a manner consistant with the other APIs. RTPathStartsWith(pszSomePath, "/") will not work if pszSomePath isn't "/".
Checks if the caller is the exclusive semaphore owner.

Returns:
true / false accoringly.
Parameters:
hRWSem Handle to the read/write semaphore.
Checks if the caller is one of the read owners of the sempahore.

Note:
!CAUTION! This API doesn't work reliably if lock validation isn't enabled. Meaning, the answer is not trustworhty unless RT_LOCK_STRICT or RTSEMRW_STRICT was defined at build time. Also, make sure you do not use RTSEMRW_FLAGS_NO_LOCK_VAL when creating the semaphore. And finally, if you used a locking class, don't disable deadlock detection by setting cMsMinDeadlock to RT_INDEFINITE_WAIT.
In short, only use this for assertions.

Returns:
true if reader, false if not.
Parameters:
hRWSem Handle to the read/write semaphore.
fWannaHear What you'd like to hear when lock validation is not available. (For avoiding asserting all over the place.)
Same as RTSortShell but speciallized for an array containing element pointers.

Returns:
true if it is sorted, false if it isn't.
Parameters:
papvArray The array to check.
cElements The number of elements in the array.
pfnCmp Callback function comparing two elements.
pvUser User argument for the callback.
Matches a simple string pattern, neither which needs to be zero terminated.

This is identical to RTStrSimplePatternMatch except that you can optionally specify the length of both the pattern and the string. The function will stop when it hits a string terminator or either of the lengths.

Returns:
true if the string matches the pattern, otherwise false.
Parameters:
pszPattern The pattern. Special chars are '*' and '?', where the asterisk matches zero or more characters and question mark matches exactly one character.
cchPattern The pattern length. Pass RTSTR_MAX if you don't know the length and wish to stop at the string terminator.
pszString The string to match against the pattern.
cchString The string length. Pass RTSTR_MAX if you don't know the length and wish to match up to the string terminator.
Matches multiple patterns against a string.

The patterns are separated by the pipe character (|).

Returns:
true if the string matches the pattern, otherwise false.
Parameters:
pszPatterns The patterns.
cchPatterns The lengths of the patterns to use. Pass RTSTR_MAX to stop at the terminator.
pszString The string to match against the pattern.
cchString The string length. Pass RTSTR_MAX stop stop at the terminator.
poffPattern Offset into the patterns string of the patttern that matched. If no match, this will be set to RTSTR_MAX. This is optional, NULL is fine.
Converts a string representation of a number to a 8-bit unsigned number. The base is guessed.

Returns:
8-bit unsigned number on success.

0 on failure.

Parameters:
pszValue Pointer to the string value.
Inserts a string into a unique string space.

Returns:
true on success.

false if the string collided with an existing string.

Parameters:
pStrSpace The space to insert it into.
pStr The string node.
Checks if the specified thread is the main thread.

Returns:
true if it is, false if it isn't.
Parameters:
hThread The thread handle.
Simple verficiation of an UDP packet (size + checksum).

Returns:
true if valid, false if invalid.
Parameters:
pIpHdr Pointer to the IPv4 header, in network endian (big). This is assumed to be valid and the minimum size being mapped.
pUdpHdr Pointer to the UDP header, in network endian (big).
pvData Pointer to the data, assuming it's one single segment and that cbPktMax - sizeof(RTNETUDP) is mapped here.
cbPktMax The max UDP packet size, UDP header and payload (data).
fChecksum Whether to validate the checksum (GSO).
Simple verficiation of an TCP packet (size + checksum).

Returns:
true if valid, false if invalid.
Parameters:
pIpHdr Pointer to the IPv4 header, in network endian (big). This is assumed to be valid and the minimum size being mapped.
pTcpHdr Pointer to the TCP header, in network endian (big).
cbHdrMax The max TCP header size (what pTcpHdr points to).
pvData Pointer to the data, assuming it's one single segment and that cbPktMax - sizeof(RTNETTCP) is mapped here. If NULL then we assume the data follows immediately after the TCP header.
cbPktMax The max TCP packet size, TCP header and payload (data).
fChecksum Whether to validate the checksum (GSO).
Minimal validation of a DHCP packet.

This will fail on BOOTP packets (if sufficient data is supplied). It will not verify the source and destination ports, that's the caller's responsibility.

This function will ASSUME that the hardware type is ethernet and use that for htype/hlen validation.

Returns:
true if valid, false if invalid.
Parameters:
pUdpHdr Pointer to the UDP header, in network endian (big). This is assumed to be valid and fully mapped.
pDhcp Pointer to the DHCP packet. This might not be the entire thing, see cbDhcp.
cbDhcp The number of valid bytes that pDhcp points to.
pMsgType Where to store the message type (if found). This will be set to 0 if not found and on failure.
Checks if the specified thread is one of the owners.

Returns:
true if it is, false if not.
Parameters:
pRec The validator record.
hThread The thread handle of the owner. NIL_RTTHREAD is an alias for the current thread.
Checks if the thread is running in the lock validator after it has entered a block state.

Returns:
true if it is, false if it isn't.
Parameters:
hThread The thread in question.
Checks if the calling thread is holding a lock in the specified class.

Returns:
true if it holds a lock in the specific class, false if it doesn't.
Parameters:
hCurrentThread The current thread. Pass NIL_RTTHREAD if you're lazy.
hClass The class.
Checks if the calling thread is holding a lock in the specified sub-class.

Returns:
true if it holds a lock in the specific sub-class, false if it doesn't.
Parameters:
hCurrentThread The current thread. Pass NIL_RTTHREAD if you're lazy.
hClass The class.
uSubClass The new sub-class value.
Enables / disables the lock validator for new locks.

Returns:
The old setting.
Parameters:
fEnabled The new setting.
Is the lock validator enabled?

Returns:
True if enabled, false if not.
Controls whether the lock validator should be quiet or noisy (default).

Returns:
The old setting.
Parameters:
fQuiet The new setting.
Is the lock validator quiet or noisy?

Returns:
True if it is quiet, false if noisy.
Makes the lock validator panic (default) or not.

Returns:
The old setting.
Parameters:
fPanic The new setting.
Can the lock validator cause panic.

Returns:
True if it can, false if not.
Verifies the header version, header size, packet size, and header checksum of the specified IPv4 header.

Returns:
true if valid, false if invalid.
Parameters:
pIpHdr Pointer to the IPv4 header to validate. Network endian (big).
cbHdrMax The max header size, or the max size of what pIpHdr points to if you like. Note that an IPv4 header can be up to 60 bytes.
cbPktMax The max IP packet size, IP header and payload. This doesn't have to be mapped following pIpHdr.
fChecksum Whether to validate the checksum (GSO).
Simple verficiation of an UDP packet (size + checksum).

Returns:
true if valid, false if invalid.
Parameters:
pIpHdr Pointer to the IPv4 header, in network endian (big). This is assumed to be valid and the minimum size being mapped.
pUdpHdr Pointer to the UDP header, in network endian (big).
pvData Pointer to the data, assuming it's one single segment and that cbPktMax - sizeof(RTNETUDP) is mapped here.
cbPktMax The max UDP packet size, UDP header and payload (data).
fChecksum Whether to validate the checksum (GSO).
Simple verficiation of an TCP packet (size + checksum).

Returns:
true if valid, false if invalid.
Parameters:
pIpHdr Pointer to the IPv4 header, in network endian (big). This is assumed to be valid and the minimum size being mapped.
pTcpHdr Pointer to the TCP header, in network endian (big).
cbHdrMax The max TCP header size (what pTcpHdr points to).
pvData Pointer to the data, assuming it's one single segment and that cbPktMax - sizeof(RTNETTCP) is mapped here. If NULL then we assume the data follows immediately after the TCP header.
cbPktMax The max TCP packet size, TCP header and payload (data).
fChecksum Whether to validate the checksum (GSO).
Minimal validation of a DHCP packet.

This will fail on BOOTP packets (if sufficient data is supplied). It will not verify the source and destination ports, that's the caller's responsibility.

This function will ASSUME that the hardware type is ethernet and use that for htype/hlen validation.

Returns:
true if valid, false if invalid.
Parameters:
pUdpHdr Pointer to the UDP header, in network endian (big). This is assumed to be valid and fully mapped.
pDhcp Pointer to the DHCP packet. This might not be the entire thing, see cbDhcp.
cbDhcp The number of valid bytes that pDhcp points to.
pMsgType Where to store the message type (if found). This will be set to 0 if not found and on failure.
Overridable function that decides whether assertions executes the panic (breakpoint) or not.

The generic implementation will return true.

Returns:
true if the breakpoint should be hit, false if it should be ignored.
Remarks:
The RTDECL() makes this a bit difficult to override on Windows. So, you'll have to use RTASSERT_HAVE_SHOULD_PANIC or RTASSERT_HAVE_SHOULD_PANIC_PRIVATE there to control the kind of prototype.
Controls whether the assertions should be quiet or noisy (default).

Returns:
The old setting.
Parameters:
fQuiet The new setting.
Are assertions quiet or noisy?

Returns:
True if they are quiet, false if noisy.
Makes the assertions panic (default) or not.

Returns:
The old setting.
Parameters:
fPanic The new setting.
Can assertion panic.

Returns:
True if they can, false if not.
Checks if a sysfs file (or directory, device, symlink, whatever) exists.

Returns:
true / false, errno is preserved.
Parameters:
pszFormat The name format, either absolute or relative to "/sys/".
... The format args.
Checks if the thread is running in the lock validator after it has entered a block state.

Returns:
true if it is, false if it isn't.
Parameters:
hThread The thread in question.
Checks if the calling thread is holding a lock in the specified class.

Returns:
true if it holds a lock in the specific class, false if it doesn't.
Parameters:
hCurrentThread The current thread. Pass NIL_RTTHREAD if you're lazy.
hClass The class.
Checks if the calling thread is holding a lock in the specified sub-class.

Returns:
true if it holds a lock in the specific sub-class, false if it doesn't.
Parameters:
hCurrentThread The current thread. Pass NIL_RTTHREAD if you're lazy.
hClass The class.
uSubClass The new sub-class value.
Enables / disables the lock validator for new locks.

Returns:
The old setting.
Parameters:
fEnabled The new setting.
Is the lock validator enabled?

Returns:
True if enabled, false if not.
Controls whether the lock validator should be quiet or noisy (default).

Returns:
The old setting.
Parameters:
fQuiet The new setting.
Is the lock validator quiet or noisy?

Returns:
True if it is quiet, false if noisy.
Makes the lock validator panic (default) or not.

Returns:
The old setting.
Parameters:
fPanic The new setting.
Can the lock validator cause panic.

Returns:
True if it can, false if not.
Checks if a CPU is online or not.

Returns:
true/false accordingly.
Parameters:
idCpu The identifier of the CPU.
Checks if a CPU is present in the system.

Returns:
true/false accordingly.
Parameters:
idCpu The identifier of the CPU.
Checks if the path exists.

Returns:
true if it exists and false if it doesn't.
Parameters:
pszPath The path to check.
fFlags RTPATH_F_ON_LINK or RTPATH_F_FOLLOW_LINK.
Checks if a path have an extension.

Returns:
true if extension present.

false if no extension.

Parameters:
pszPath Path to check.
Checks if a path includes more than a filename.

Returns:
true if path present.

false if no path.

Parameters:
pszPath Path to check.
Checks if a path starts with the given parent path.

This means that either the path and the parent path matches completely, or that the path is to some file or directory residing in the tree given by the parent directory.

The path comparison takes platform-dependent details into account, see RTPathCompare() for details.

Returns:
|true| when pszPath starts with pszParentPath (or when they are identical), or |false| otherwise.
Parameters:
pszPath Path to check, must be an absolute path.
pszParentPath Parent path, must be an absolute path. No trailing directory slash!
Remarks:
This API doesn't currently handle root directory compares in a manner consistant with the other APIs. RTPathStartsWith(pszSomePath, "/") will not work if pszSomePath isn't "/".
Checks if the caller is the exclusive semaphore owner.

Returns:
true / false accoringly.
Parameters:
hRWSem Handle to the read/write semaphore.
Checks if the caller is one of the read owners of the sempahore.

Note:
!CAUTION! This API doesn't work reliably if lock validation isn't enabled. Meaning, the answer is not trustworhty unless RT_LOCK_STRICT or RTSEMRW_STRICT was defined at build time. Also, make sure you do not use RTSEMRW_FLAGS_NO_LOCK_VAL when creating the semaphore. And finally, if you used a locking class, don't disable deadlock detection by setting cMsMinDeadlock to RT_INDEFINITE_WAIT.
In short, only use this for assertions.

Returns:
true if reader, false if not.
Parameters:
hRWSem Handle to the read/write semaphore.
fWannaHear What you'd like to hear when lock validation is not available. (For avoiding asserting all over the place.)
Same as RTSortShell but speciallized for an array containing element pointers.

Returns:
true if it is sorted, false if it isn't.
Parameters:
papvArray The array to check.
cElements The number of elements in the array.
pfnCmp Callback function comparing two elements.
pvUser User argument for the callback.
Matches a simple string pattern, neither which needs to be zero terminated.

This is identical to RTStrSimplePatternMatch except that you can optionally specify the length of both the pattern and the string. The function will stop when it hits a string terminator or either of the lengths.

Returns:
true if the string matches the pattern, otherwise false.
Parameters:
pszPattern The pattern. Special chars are '*' and '?', where the asterisk matches zero or more characters and question mark matches exactly one character.
cchPattern The pattern length. Pass RTSTR_MAX if you don't know the length and wish to stop at the string terminator.
pszString The string to match against the pattern.
cchString The string length. Pass RTSTR_MAX if you don't know the length and wish to match up to the string terminator.
Matches multiple patterns against a string.

The patterns are separated by the pipe character (|).

Returns:
true if the string matches the pattern, otherwise false.
Parameters:
pszPatterns The patterns.
cchPatterns The lengths of the patterns to use. Pass RTSTR_MAX to stop at the terminator.
pszString The string to match against the pattern.
cchString The string length. Pass RTSTR_MAX stop stop at the terminator.
poffPattern Offset into the patterns string of the patttern that matched. If no match, this will be set to RTSTR_MAX. This is optional, NULL is fine.
Converts a string representation of a number to a 8-bit unsigned number. The base is guessed.

Returns:
8-bit unsigned number on success.

0 on failure.

Parameters:
pszValue Pointer to the string value.
Inserts a string into a unique string space.

Returns:
true on success.

false if the string collided with an existing string.

Parameters:
pStrSpace The space to insert it into.
pStr The string node.
Checks if the specified thread is the main thread.

Returns:
true if it is, false if it isn't.
Parameters:
hThread The thread handle.
Simple verficiation of an UDP packet (size + checksum).

Returns:
true if valid, false if invalid.
Parameters:
pIpHdr Pointer to the IPv4 header, in network endian (big). This is assumed to be valid and the minimum size being mapped.
pUdpHdr Pointer to the UDP header, in network endian (big).
pvData Pointer to the data, assuming it's one single segment and that cbPktMax - sizeof(RTNETUDP) is mapped here.
cbPktMax The max UDP packet size, UDP header and payload (data).
fChecksum Whether to validate the checksum (GSO).
Simple verficiation of an TCP packet (size + checksum).

Returns:
true if valid, false if invalid.
Parameters:
pIpHdr Pointer to the IPv4 header, in network endian (big). This is assumed to be valid and the minimum size being mapped.
pTcpHdr Pointer to the TCP header, in network endian (big).
cbHdrMax The max TCP header size (what pTcpHdr points to).
pvData Pointer to the data, assuming it's one single segment and that cbPktMax - sizeof(RTNETTCP) is mapped here. If NULL then we assume the data follows immediately after the TCP header.
cbPktMax The max TCP packet size, TCP header and payload (data).
fChecksum Whether to validate the checksum (GSO).
Minimal validation of a DHCP packet.

This will fail on BOOTP packets (if sufficient data is supplied). It will not verify the source and destination ports, that's the caller's responsibility.

This function will ASSUME that the hardware type is ethernet and use that for htype/hlen validation.

Returns:
true if valid, false if invalid.
Parameters:
pUdpHdr Pointer to the UDP header, in network endian (big). This is assumed to be valid and fully mapped.
pDhcp Pointer to the DHCP packet. This might not be the entire thing, see cbDhcp.
cbDhcp The number of valid bytes that pDhcp points to.
pMsgType Where to store the message type (if found). This will be set to 0 if not found and on failure.
Checks if the specified thread is one of the owners.

Returns:
true if it is, false if not.
Parameters:
pRec The validator record.
hThread The thread handle of the owner. NIL_RTTHREAD is an alias for the current thread.
Checks if the thread is running in the lock validator after it has entered a block state.

Returns:
true if it is, false if it isn't.
Parameters:
hThread The thread in question.
Checks if the calling thread is holding a lock in the specified class.

Returns:
true if it holds a lock in the specific class, false if it doesn't.
Parameters:
hCurrentThread The current thread. Pass NIL_RTTHREAD if you're lazy.
hClass The class.
Checks if the calling thread is holding a lock in the specified sub-class.

Returns:
true if it holds a lock in the specific sub-class, false if it doesn't.
Parameters:
hCurrentThread The current thread. Pass NIL_RTTHREAD if you're lazy.
hClass The class.
uSubClass The new sub-class value.
Enables / disables the lock validator for new locks.

Returns:
The old setting.
Parameters:
fEnabled The new setting.
Is the lock validator enabled?

Returns:
True if enabled, false if not.
Controls whether the lock validator should be quiet or noisy (default).

Returns:
The old setting.
Parameters:
fQuiet The new setting.
Is the lock validator quiet or noisy?

Returns:
True if it is quiet, false if noisy.
Makes the lock validator panic (default) or not.

Returns:
The old setting.
Parameters:
fPanic The new setting.
Can the lock validator cause panic.

Returns:
True if it can, false if not.
Verifies the header version, header size, packet size, and header checksum of the specified IPv4 header.

Returns:
true if valid, false if invalid.
Parameters:
pIpHdr Pointer to the IPv4 header to validate. Network endian (big).
cbHdrMax The max header size, or the max size of what pIpHdr points to if you like. Note that an IPv4 header can be up to 60 bytes.
cbPktMax The max IP packet size, IP header and payload. This doesn't have to be mapped following pIpHdr.
fChecksum Whether to validate the checksum (GSO).
Simple verficiation of an UDP packet (size + checksum).

Returns:
true if valid, false if invalid.
Parameters:
pIpHdr Pointer to the IPv4 header, in network endian (big). This is assumed to be valid and the minimum size being mapped.
pUdpHdr Pointer to the UDP header, in network endian (big).
pvData Pointer to the data, assuming it's one single segment and that cbPktMax - sizeof(RTNETUDP) is mapped here.
cbPktMax The max UDP packet size, UDP header and payload (data).
fChecksum Whether to validate the checksum (GSO).
Simple verficiation of an TCP packet (size + checksum).

Returns:
true if valid, false if invalid.
Parameters:
pIpHdr Pointer to the IPv4 header, in network endian (big). This is assumed to be valid and the minimum size being mapped.
pTcpHdr Pointer to the TCP header, in network endian (big).
cbHdrMax The max TCP header size (what pTcpHdr points to).
pvData Pointer to the data, assuming it's one single segment and that cbPktMax - sizeof(RTNETTCP) is mapped here. If NULL then we assume the data follows immediately after the TCP header.
cbPktMax The max TCP packet size, TCP header and payload (data).
fChecksum Whether to validate the checksum (GSO).
Minimal validation of a DHCP packet.

This will fail on BOOTP packets (if sufficient data is supplied). It will not verify the source and destination ports, that's the caller's responsibility.

This function will ASSUME that the hardware type is ethernet and use that for htype/hlen validation.

Returns:
true if valid, false if invalid.
Parameters:
pUdpHdr Pointer to the UDP header, in network endian (big). This is assumed to be valid and fully mapped.
pDhcp Pointer to the DHCP packet. This might not be the entire thing, see cbDhcp.
cbDhcp The number of valid bytes that pDhcp points to.
pMsgType Where to store the message type (if found). This will be set to 0 if not found and on failure.
Checks if the queue is busy or not.

The caller is responsible for dealing with any concurrent submitts.

Returns:
true if busy, false if idle.
Parameters:
pQueue The queue.
Checks if the specified thread is the main thread.

Returns:
true if it is, false if it isn't.
Parameters:
hThread The thread handle.
Remarks:
This function may not return the correct value when RTR3Init was called on a thread of the than the main one. This could for instance happen when the DLL/DYLIB/SO containing IPRT is dynamically loaded at run time by a different thread.
Inserts a string into a unique string space.

Returns:
true on success.

false if the string collieded with an existing string.

Parameters:
pStrSpace The space to insert it into.
pStr The string node.
Inserts a node into the AVL-tree.
Returns:
TRUE if inserted. FALSE if node exists in tree.
Parameters:
ppTree Pointer to the AVL-tree root node pointer.
pNode Pointer to the node which is to be added. Find the location of the node (using binary tree algorithm.): LOOP until KAVL_NULL leaf pointer BEGIN Add node pointer pointer to the AVL-stack. IF new-node-key < node key THEN left ELSE right END Fill in leaf node and insert it. Rebalance the tree.
Checks if a year is a leap year or not.

Returns:
true if it's a leap year.

false if it's a common year.

Parameters:
i32Year The year in question.
Overridable function that decides whether assertions executes the panic (breakpoint) or not.

The generic implementation will return true.

Returns:
true if the breakpoint should be hit, false if it should be ignored.
Remarks:
The RTDECL() makes this a bit difficult to override on Windows. So, you'll have to use RTASSERT_HAVE_SHOULD_PANIC or RTASSERT_HAVE_SHOULD_PANIC_PRIVATE there to control the kind of prototype.
Controls whether the assertions should be quiet or noisy (default).

Returns:
The old setting.
Parameters:
fQuiet The new setting.
Are assertions quiet or noisy?

Returns:
True if they are quiet, false if noisy.
Makes the assertions panic (default) or not.

Returns:
The old setting.
Parameters:
fPanic The new setting.
Can assertion panic.

Returns:
True if they can, false if not.
Checks if a sysfs file (or directory, device, symlink, whatever) exists.

Returns:
true / false, errno is preserved.
Parameters:
pszFormat The name format, either absolute or relative to "/sys/".
... The format args.
Checks if the thread is running in the lock validator after it has entered a block state.

Returns:
true if it is, false if it isn't.
Parameters:
hThread The thread in question.
Checks if the calling thread is holding a lock in the specified class.

Returns:
true if it holds a lock in the specific class, false if it doesn't.
Parameters:
hCurrentThread The current thread. Pass NIL_RTTHREAD if you're lazy.
hClass The class.
Checks if the calling thread is holding a lock in the specified sub-class.

Returns:
true if it holds a lock in the specific sub-class, false if it doesn't.
Parameters:
hCurrentThread The current thread. Pass NIL_RTTHREAD if you're lazy.
hClass The class.
uSubClass The new sub-class value.
Enables / disables the lock validator for new locks.

Returns:
The old setting.
Parameters:
fEnabled The new setting.
Is the lock validator enabled?

Returns:
True if enabled, false if not.
Controls whether the lock validator should be quiet or noisy (default).

Returns:
The old setting.
Parameters:
fQuiet The new setting.
Is the lock validator quiet or noisy?

Returns:
True if it is quiet, false if noisy.
Makes the lock validator panic (default) or not.

Returns:
The old setting.
Parameters:
fPanic The new setting.
Can the lock validator cause panic.

Returns:
True if it can, false if not.
Checks if a CPU is online or not.

Returns:
true/false accordingly.
Parameters:
idCpu The identifier of the CPU.
Checks if a CPU is present in the system.

Returns:
true/false accordingly.
Parameters:
idCpu The identifier of the CPU.
Checks if the path exists.

Returns:
true if it exists and false if it doesn't.
Parameters:
pszPath The path to check.
fFlags RTPATH_F_ON_LINK or RTPATH_F_FOLLOW_LINK.
Checks if a path have an extension.

Returns:
true if extension present.

false if no extension.

Parameters:
pszPath Path to check.
Checks if a path includes more than a filename.

Returns:
true if path present.

false if no path.

Parameters:
pszPath Path to check.
Checks if a path starts with the given parent path.

This means that either the path and the parent path matches completely, or that the path is to some file or directory residing in the tree given by the parent directory.

The path comparison takes platform-dependent details into account, see RTPathCompare() for details.

Returns:
|true| when pszPath starts with pszParentPath (or when they are identical), or |false| otherwise.
Parameters:
pszPath Path to check, must be an absolute path.
pszParentPath Parent path, must be an absolute path. No trailing directory slash!
Remarks:
This API doesn't currently handle root directory compares in a manner consistant with the other APIs. RTPathStartsWith(pszSomePath, "/") will not work if pszSomePath isn't "/".
Checks if the caller is the exclusive semaphore owner.

Returns:
true / false accoringly.
Parameters:
hRWSem Handle to the read/write semaphore.
Checks if the caller is one of the read owners of the sempahore.

Note:
!CAUTION! This API doesn't work reliably if lock validation isn't enabled. Meaning, the answer is not trustworhty unless RT_LOCK_STRICT or RTSEMRW_STRICT was defined at build time. Also, make sure you do not use RTSEMRW_FLAGS_NO_LOCK_VAL when creating the semaphore. And finally, if you used a locking class, don't disable deadlock detection by setting cMsMinDeadlock to RT_INDEFINITE_WAIT.
In short, only use this for assertions.

Returns:
true if reader, false if not.
Parameters:
hRWSem Handle to the read/write semaphore.
fWannaHear What you'd like to hear when lock validation is not available. (For avoiding asserting all over the place.)
Same as RTSortShell but speciallized for an array containing element pointers.

Returns:
true if it is sorted, false if it isn't.
Parameters:
papvArray The array to check.
cElements The number of elements in the array.
pfnCmp Callback function comparing two elements.
pvUser User argument for the callback.
Matches a simple string pattern, neither which needs to be zero terminated.

This is identical to RTStrSimplePatternMatch except that you can optionally specify the length of both the pattern and the string. The function will stop when it hits a string terminator or either of the lengths.

Returns:
true if the string matches the pattern, otherwise false.
Parameters:
pszPattern The pattern. Special chars are '*' and '?', where the asterisk matches zero or more characters and question mark matches exactly one character.
cchPattern The pattern length. Pass RTSTR_MAX if you don't know the length and wish to stop at the string terminator.
pszString The string to match against the pattern.
cchString The string length. Pass RTSTR_MAX if you don't know the length and wish to match up to the string terminator.
Matches multiple patterns against a string.

The patterns are separated by the pipe character (|).

Returns:
true if the string matches the pattern, otherwise false.
Parameters:
pszPatterns The patterns.
cchPatterns The lengths of the patterns to use. Pass RTSTR_MAX to stop at the terminator.
pszString The string to match against the pattern.
cchString The string length. Pass RTSTR_MAX stop stop at the terminator.
poffPattern Offset into the patterns string of the patttern that matched. If no match, this will be set to RTSTR_MAX. This is optional, NULL is fine.
Converts a string representation of a number to a 8-bit unsigned number. The base is guessed.

Returns:
8-bit unsigned number on success.

0 on failure.

Parameters:
pszValue Pointer to the string value.
Inserts a string into a unique string space.

Returns:
true on success.

false if the string collided with an existing string.

Parameters:
pStrSpace The space to insert it into.
pStr The string node.
Checks if the specified thread is the main thread.

Returns:
true if it is, false if it isn't.
Parameters:
hThread The thread handle.
Simple verficiation of an UDP packet (size + checksum).

Returns:
true if valid, false if invalid.
Parameters:
pIpHdr Pointer to the IPv4 header, in network endian (big). This is assumed to be valid and the minimum size being mapped.
pUdpHdr Pointer to the UDP header, in network endian (big).
pvData Pointer to the data, assuming it's one single segment and that cbPktMax - sizeof(RTNETUDP) is mapped here.
cbPktMax The max UDP packet size, UDP header and payload (data).
fChecksum Whether to validate the checksum (GSO).
Simple verficiation of an TCP packet (size + checksum).

Returns:
true if valid, false if invalid.
Parameters:
pIpHdr Pointer to the IPv4 header, in network endian (big). This is assumed to be valid and the minimum size being mapped.
pTcpHdr Pointer to the TCP header, in network endian (big).
cbHdrMax The max TCP header size (what pTcpHdr points to).
pvData Pointer to the data, assuming it's one single segment and that cbPktMax - sizeof(RTNETTCP) is mapped here. If NULL then we assume the data follows immediately after the TCP header.
cbPktMax The max TCP packet size, TCP header and payload (data).
fChecksum Whether to validate the checksum (GSO).
Minimal validation of a DHCP packet.

This will fail on BOOTP packets (if sufficient data is supplied). It will not verify the source and destination ports, that's the caller's responsibility.

This function will ASSUME that the hardware type is ethernet and use that for htype/hlen validation.

Returns:
true if valid, false if invalid.
Parameters:
pUdpHdr Pointer to the UDP header, in network endian (big). This is assumed to be valid and fully mapped.
pDhcp Pointer to the DHCP packet. This might not be the entire thing, see cbDhcp.
cbDhcp The number of valid bytes that pDhcp points to.
pMsgType Where to store the message type (if found). This will be set to 0 if not found and on failure.
Checks if the specified thread is one of the owners.

Returns:
true if it is, false if not.
Parameters:
pRec The validator record.
hThread The thread handle of the owner. NIL_RTTHREAD is an alias for the current thread.
Checks if the thread is running in the lock validator after it has entered a block state.

Returns:
true if it is, false if it isn't.
Parameters:
hThread The thread in question.
Checks if the calling thread is holding a lock in the specified class.

Returns:
true if it holds a lock in the specific class, false if it doesn't.
Parameters:
hCurrentThread The current thread. Pass NIL_RTTHREAD if you're lazy.
hClass The class.
Checks if the calling thread is holding a lock in the specified sub-class.

Returns:
true if it holds a lock in the specific sub-class, false if it doesn't.
Parameters:
hCurrentThread The current thread. Pass NIL_RTTHREAD if you're lazy.
hClass The class.
uSubClass The new sub-class value.
Enables / disables the lock validator for new locks.

Returns:
The old setting.
Parameters:
fEnabled The new setting.
Is the lock validator enabled?

Returns:
True if enabled, false if not.
Controls whether the lock validator should be quiet or noisy (default).

Returns:
The old setting.
Parameters:
fQuiet The new setting.
Is the lock validator quiet or noisy?

Returns:
True if it is quiet, false if noisy.
Makes the lock validator panic (default) or not.

Returns:
The old setting.
Parameters:
fPanic The new setting.
Can the lock validator cause panic.

Returns:
True if it can, false if not.
Verifies the header version, header size, packet size, and header checksum of the specified IPv4 header.

Returns:
true if valid, false if invalid.
Parameters:
pIpHdr Pointer to the IPv4 header to validate. Network endian (big).
cbHdrMax The max header size, or the max size of what pIpHdr points to if you like. Note that an IPv4 header can be up to 60 bytes.
cbPktMax The max IP packet size, IP header and payload. This doesn't have to be mapped following pIpHdr.
fChecksum Whether to validate the checksum (GSO).
Simple verficiation of an UDP packet (size + checksum).

Returns:
true if valid, false if invalid.
Parameters:
pIpHdr Pointer to the IPv4 header, in network endian (big). This is assumed to be valid and the minimum size being mapped.
pUdpHdr Pointer to the UDP header, in network endian (big).
pvData Pointer to the data, assuming it's one single segment and that cbPktMax - sizeof(RTNETUDP) is mapped here.
cbPktMax The max UDP packet size, UDP header and payload (data).
fChecksum Whether to validate the checksum (GSO).
Simple verficiation of an TCP packet (size + checksum).

Returns:
true if valid, false if invalid.
Parameters:
pIpHdr Pointer to the IPv4 header, in network endian (big). This is assumed to be valid and the minimum size being mapped.
pTcpHdr Pointer to the TCP header, in network endian (big).
cbHdrMax The max TCP header size (what pTcpHdr points to).
pvData Pointer to the data, assuming it's one single segment and that cbPktMax - sizeof(RTNETTCP) is mapped here. If NULL then we assume the data follows immediately after the TCP header.
cbPktMax The max TCP packet size, TCP header and payload (data).
fChecksum Whether to validate the checksum (GSO).
Minimal validation of a DHCP packet.

This will fail on BOOTP packets (if sufficient data is supplied). It will not verify the source and destination ports, that's the caller's responsibility.

This function will ASSUME that the hardware type is ethernet and use that for htype/hlen validation.

Returns:
true if valid, false if invalid.
Parameters:
pUdpHdr Pointer to the UDP header, in network endian (big). This is assumed to be valid and fully mapped.
pDhcp Pointer to the DHCP packet. This might not be the entire thing, see cbDhcp.
cbDhcp The number of valid bytes that pDhcp points to.
pMsgType Where to store the message type (if found). This will be set to 0 if not found and on failure.
Checks if the queue is busy or not.

The caller is responsible for dealing with any concurrent submitts.

Returns:
true if busy, false if idle.
Parameters:
pQueue The queue.
Checks if the specified thread is the main thread.

Returns:
true if it is, false if it isn't.
Parameters:
hThread The thread handle.
Remarks:
This function may not return the correct value when RTR3Init was called on a thread of the than the main one. This could for instance happen when the DLL/DYLIB/SO containing IPRT is dynamically loaded at run time by a different thread.
Inserts a string into a unique string space.

Returns:
true on success.

false if the string collieded with an existing string.

Parameters:
pStrSpace The space to insert it into.
pStr The string node.
Inserts a node into the AVL-tree.
Returns:
TRUE if inserted. FALSE if node exists in tree.
Parameters:
ppTree Pointer to the AVL-tree root node pointer.
pNode Pointer to the node which is to be added. Find the location of the node (using binary tree algorithm.): LOOP until KAVL_NULL leaf pointer BEGIN Add node pointer pointer to the AVL-stack. IF new-node-key < node key THEN left ELSE right END Fill in leaf node and insert it. Rebalance the tree.
Checks if a year is a leap year or not.

Returns:
true if it's a leap year.

false if it's a common year.

Parameters:
i32Year The year in question.
Check if there's work (DPCs on Windows) pending on the current CPU.

Returns:
true if there's pending work on the current CPU, false otherwise.
Overridable function that decides whether assertions executes the panic (breakpoint) or not.

The generic implementation will return true.

Returns:
true if the breakpoint should be hit, false if it should be ignored.
Remarks:
The RTDECL() makes this a bit difficult to override on Windows. So, you'll have to use RTASSERT_HAVE_SHOULD_PANIC or RTASSERT_HAVE_SHOULD_PANIC_PRIVATE there to control the kind of prototype.
Controls whether the assertions should be quiet or noisy (default).

Returns:
The old setting.
Parameters:
fQuiet The new setting.
Are assertions quiet or noisy?

Returns:
True if they are quiet, false if noisy.
Makes the assertions panic (default) or not.

Returns:
The old setting.
Parameters:
fPanic The new setting.
Can assertion panic.

Returns:
True if they can, false if not.
Checks if a sysfs file (or directory, device, symlink, whatever) exists.

Returns:
true / false, errno is preserved.
Parameters:
pszFormat The name format, either absolute or relative to "/sys/".
... The format args.
Checks if the thread is running in the lock validator after it has entered a block state.

Returns:
true if it is, false if it isn't.
Parameters:
hThread The thread in question.
Checks if the calling thread is holding a lock in the specified class.

Returns:
true if it holds a lock in the specific class, false if it doesn't.
Parameters:
hCurrentThread The current thread. Pass NIL_RTTHREAD if you're lazy.
hClass The class.
Checks if the calling thread is holding a lock in the specified sub-class.

Returns:
true if it holds a lock in the specific sub-class, false if it doesn't.
Parameters:
hCurrentThread The current thread. Pass NIL_RTTHREAD if you're lazy.
hClass The class.
uSubClass The new sub-class value.
Enables / disables the lock validator for new locks.

Returns:
The old setting.
Parameters:
fEnabled The new setting.
Is the lock validator enabled?

Returns:
True if enabled, false if not.
Controls whether the lock validator should be quiet or noisy (default).

Returns:
The old setting.
Parameters:
fQuiet The new setting.
Is the lock validator quiet or noisy?

Returns:
True if it is quiet, false if noisy.
Makes the lock validator panic (default) or not.

Returns:
The old setting.
Parameters:
fPanic The new setting.
Can the lock validator cause panic.

Returns:
True if it can, false if not.
Checks if a CPU is online or not.

Returns:
true/false accordingly.
Parameters:
idCpu The identifier of the CPU.
Checks if a CPU is present in the system.

Returns:
true/false accordingly.
Parameters:
idCpu The identifier of the CPU.
Checks if the path exists.

Returns:
true if it exists and false if it doesn't.
Parameters:
pszPath The path to check.
fFlags RTPATH_F_ON_LINK or RTPATH_F_FOLLOW_LINK.
Checks if a path have an extension.

Returns:
true if extension present.

false if no extension.

Parameters:
pszPath Path to check.
Checks if a path includes more than a filename.

Returns:
true if path present.

false if no path.

Parameters:
pszPath Path to check.
Checks if a path starts with the given parent path.

This means that either the path and the parent path matches completely, or that the path is to some file or directory residing in the tree given by the parent directory.

The path comparison takes platform-dependent details into account, see RTPathCompare() for details.

Returns:
|true| when pszPath starts with pszParentPath (or when they are identical), or |false| otherwise.
Parameters:
pszPath Path to check, must be an absolute path.
pszParentPath Parent path, must be an absolute path. No trailing directory slash!
Remarks:
This API doesn't currently handle root directory compares in a manner consistant with the other APIs. RTPathStartsWith(pszSomePath, "/") will not work if pszSomePath isn't "/".
Checks if the caller is the exclusive semaphore owner.

Returns:
true / false accoringly.
Parameters:
hRWSem Handle to the read/write semaphore.
Checks if the caller is one of the read owners of the sempahore.

Note:
!CAUTION! This API doesn't work reliably if lock validation isn't enabled. Meaning, the answer is not trustworhty unless RT_LOCK_STRICT or RTSEMRW_STRICT was defined at build time. Also, make sure you do not use RTSEMRW_FLAGS_NO_LOCK_VAL when creating the semaphore. And finally, if you used a locking class, don't disable deadlock detection by setting cMsMinDeadlock to RT_INDEFINITE_WAIT.
In short, only use this for assertions.

Returns:
true if reader, false if not.
Parameters:
hRWSem Handle to the read/write semaphore.
fWannaHear What you'd like to hear when lock validation is not available. (For avoiding asserting all over the place.)
Same as RTSortShell but speciallized for an array containing element pointers.

Returns:
true if it is sorted, false if it isn't.
Parameters:
papvArray The array to check.
cElements The number of elements in the array.
pfnCmp Callback function comparing two elements.
pvUser User argument for the callback.
Matches a simple string pattern, neither which needs to be zero terminated.

This is identical to RTStrSimplePatternMatch except that you can optionally specify the length of both the pattern and the string. The function will stop when it hits a string terminator or either of the lengths.

Returns:
true if the string matches the pattern, otherwise false.
Parameters:
pszPattern The pattern. Special chars are '*' and '?', where the asterisk matches zero or more characters and question mark matches exactly one character.
cchPattern The pattern length. Pass RTSTR_MAX if you don't know the length and wish to stop at the string terminator.
pszString The string to match against the pattern.
cchString The string length. Pass RTSTR_MAX if you don't know the length and wish to match up to the string terminator.
Matches multiple patterns against a string.

The patterns are separated by the pipe character (|).

Returns:
true if the string matches the pattern, otherwise false.
Parameters:
pszPatterns The patterns.
cchPatterns The lengths of the patterns to use. Pass RTSTR_MAX to stop at the terminator.
pszString The string to match against the pattern.
cchString The string length. Pass RTSTR_MAX stop stop at the terminator.
poffPattern Offset into the patterns string of the patttern that matched. If no match, this will be set to RTSTR_MAX. This is optional, NULL is fine.
Converts a string representation of a number to a 8-bit unsigned number. The base is guessed.

Returns:
8-bit unsigned number on success.

0 on failure.

Parameters:
pszValue Pointer to the string value.
Inserts a string into a unique string space.

Returns:
true on success.

false if the string collided with an existing string.

Parameters:
pStrSpace The space to insert it into.
pStr The string node.
Checks if the specified thread is the main thread.

Returns:
true if it is, false if it isn't.
Parameters:
hThread The thread handle.
Simple verficiation of an UDP packet (size + checksum).

Returns:
true if valid, false if invalid.
Parameters:
pIpHdr Pointer to the IPv4 header, in network endian (big). This is assumed to be valid and the minimum size being mapped.
pUdpHdr Pointer to the UDP header, in network endian (big).
pvData Pointer to the data, assuming it's one single segment and that cbPktMax - sizeof(RTNETUDP) is mapped here.
cbPktMax The max UDP packet size, UDP header and payload (data).
fChecksum Whether to validate the checksum (GSO).
Simple verficiation of an TCP packet (size + checksum).

Returns:
true if valid, false if invalid.
Parameters:
pIpHdr Pointer to the IPv4 header, in network endian (big). This is assumed to be valid and the minimum size being mapped.
pTcpHdr Pointer to the TCP header, in network endian (big).
cbHdrMax The max TCP header size (what pTcpHdr points to).
pvData Pointer to the data, assuming it's one single segment and that cbPktMax - sizeof(RTNETTCP) is mapped here. If NULL then we assume the data follows immediately after the TCP header.
cbPktMax The max TCP packet size, TCP header and payload (data).
fChecksum Whether to validate the checksum (GSO).
Minimal validation of a DHCP packet.

This will fail on BOOTP packets (if sufficient data is supplied). It will not verify the source and destination ports, that's the caller's responsibility.

This function will ASSUME that the hardware type is ethernet and use that for htype/hlen validation.

Returns:
true if valid, false if invalid.
Parameters:
pUdpHdr Pointer to the UDP header, in network endian (big). This is assumed to be valid and fully mapped.
pDhcp Pointer to the DHCP packet. This might not be the entire thing, see cbDhcp.
cbDhcp The number of valid bytes that pDhcp points to.
pMsgType Where to store the message type (if found). This will be set to 0 if not found and on failure.
Checks if the specified thread is one of the owners.

Returns:
true if it is, false if not.
Parameters:
pRec The validator record.
hThread The thread handle of the owner. NIL_RTTHREAD is an alias for the current thread.
Checks if the thread is running in the lock validator after it has entered a block state.

Returns:
true if it is, false if it isn't.
Parameters:
hThread The thread in question.
Checks if the calling thread is holding a lock in the specified class.

Returns:
true if it holds a lock in the specific class, false if it doesn't.
Parameters:
hCurrentThread The current thread. Pass NIL_RTTHREAD if you're lazy.
hClass The class.
Checks if the calling thread is holding a lock in the specified sub-class.

Returns:
true if it holds a lock in the specific sub-class, false if it doesn't.
Parameters:
hCurrentThread The current thread. Pass NIL_RTTHREAD if you're lazy.
hClass The class.
uSubClass The new sub-class value.
Enables / disables the lock validator for new locks.

Returns:
The old setting.
Parameters:
fEnabled The new setting.
Is the lock validator enabled?

Returns:
True if enabled, false if not.
Controls whether the lock validator should be quiet or noisy (default).

Returns:
The old setting.
Parameters:
fQuiet The new setting.
Is the lock validator quiet or noisy?

Returns:
True if it is quiet, false if noisy.
Makes the lock validator panic (default) or not.

Returns:
The old setting.
Parameters:
fPanic The new setting.
Can the lock validator cause panic.

Returns:
True if it can, false if not.
Verifies the header version, header size, packet size, and header checksum of the specified IPv4 header.

Returns:
true if valid, false if invalid.
Parameters:
pIpHdr Pointer to the IPv4 header to validate. Network endian (big).
cbHdrMax The max header size, or the max size of what pIpHdr points to if you like. Note that an IPv4 header can be up to 60 bytes.
cbPktMax The max IP packet size, IP header and payload. This doesn't have to be mapped following pIpHdr.
fChecksum Whether to validate the checksum (GSO).
Simple verficiation of an UDP packet (size + checksum).

Returns:
true if valid, false if invalid.
Parameters:
pIpHdr Pointer to the IPv4 header, in network endian (big). This is assumed to be valid and the minimum size being mapped.
pUdpHdr Pointer to the UDP header, in network endian (big).
pvData Pointer to the data, assuming it's one single segment and that cbPktMax - sizeof(RTNETUDP) is mapped here.
cbPktMax The max UDP packet size, UDP header and payload (data).
fChecksum Whether to validate the checksum (GSO).
Simple verficiation of an TCP packet (size + checksum).

Returns:
true if valid, false if invalid.
Parameters:
pIpHdr Pointer to the IPv4 header, in network endian (big). This is assumed to be valid and the minimum size being mapped.
pTcpHdr Pointer to the TCP header, in network endian (big).
cbHdrMax The max TCP header size (what pTcpHdr points to).
pvData Pointer to the data, assuming it's one single segment and that cbPktMax - sizeof(RTNETTCP) is mapped here. If NULL then we assume the data follows immediately after the TCP header.
cbPktMax The max TCP packet size, TCP header and payload (data).
fChecksum Whether to validate the checksum (GSO).
Minimal validation of a DHCP packet.

This will fail on BOOTP packets (if sufficient data is supplied). It will not verify the source and destination ports, that's the caller's responsibility.

This function will ASSUME that the hardware type is ethernet and use that for htype/hlen validation.

Returns:
true if valid, false if invalid.
Parameters:
pUdpHdr Pointer to the UDP header, in network endian (big). This is assumed to be valid and fully mapped.
pDhcp Pointer to the DHCP packet. This might not be the entire thing, see cbDhcp.
cbDhcp The number of valid bytes that pDhcp points to.
pMsgType Where to store the message type (if found). This will be set to 0 if not found and on failure.
Checks if the queue is busy or not.

The caller is responsible for dealing with any concurrent submitts.

Returns:
true if busy, false if idle.
Parameters:
pQueue The queue.
Checks if the specified thread is the main thread.

Returns:
true if it is, false if it isn't.
Parameters:
hThread The thread handle.
Remarks:
This function may not return the correct value when RTR3Init was called on a thread of the than the main one. This could for instance happen when the DLL/DYLIB/SO containing IPRT is dynamically loaded at run time by a different thread.
Inserts a string into a unique string space.

Returns:
true on success.

false if the string collieded with an existing string.

Parameters:
pStrSpace The space to insert it into.
pStr The string node.
Inserts a node into the AVL-tree.
Returns:
TRUE if inserted. FALSE if node exists in tree.
Parameters:
ppTree Pointer to the AVL-tree root node pointer.
pNode Pointer to the node which is to be added. Find the location of the node (using binary tree algorithm.): LOOP until KAVL_NULL leaf pointer BEGIN Add node pointer pointer to the AVL-stack. IF new-node-key < node key THEN left ELSE right END Fill in leaf node and insert it. Rebalance the tree.
Checks if a year is a leap year or not.

Returns:
true if it's a leap year.

false if it's a common year.

Parameters:
i32Year The year in question.
Check if there's work (DPCs on Windows) pending on the current CPU.

Returns:
true if there's pending work on the current CPU, false otherwise.

Todo:
check this up with hotplugging!

Definition at line 83 of file assert.cpp.

{
    return ASMAtomicUoReadBool(&g_fQuiet);
}


Generated by  Doxygen 1.6.0   Back to index