mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-10-09 15:52:27 +03:00
runtime: add error for "scratch in use"
This commit adds the HS_SCRATCH_IN_USE error, which is returned when Hyperscan detects that a scratch region is already in use on entry to an API function.
This commit is contained in:
committed by
Matthew Barr
parent
11896dcf42
commit
c12b953131
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, Intel Corporation
|
||||
* Copyright (c) 2015-2016, Intel Corporation
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
@@ -500,6 +500,25 @@ const char *hs_version(void);
|
||||
*/
|
||||
#define HS_BAD_ALLOC (-9)
|
||||
|
||||
/**
|
||||
* The scratch region was already in use.
|
||||
*
|
||||
* This error is returned when Hyperscan is able to detect that the scratch
|
||||
* region given is already in use by another Hyperscan API call.
|
||||
*
|
||||
* A separate scratch region, allocated with @ref hs_alloc_scratch() or @ref
|
||||
* hs_clone_scratch(), is required for every concurrent caller of the Hyperscan
|
||||
* API.
|
||||
*
|
||||
* For example, this error might be returned when @ref hs_scan() has been
|
||||
* called inside a callback delivered by a currently-executing @ref hs_scan()
|
||||
* call using the same scratch region.
|
||||
*
|
||||
* Note: Not all concurrent uses of scratch regions may be detected. This error
|
||||
* is intended as a best-effort debugging tool, not a guarantee.
|
||||
*/
|
||||
#define HS_SCRATCH_IN_USE (-10)
|
||||
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Reference in New Issue
Block a user