From: Martin Ling Date: Sun, 24 May 2015 12:47:09 +0000 (+0100) Subject: doc: Additional notes on sp_last_error_{code,message}. X-Git-Tag: libserialport-0.1.1~25 X-Git-Url: http://sigrok.org/gitweb/?p=libserialport.git;a=commitdiff_plain;h=ec4b55ae25c368e30a5db6ab6cb33bb6abeca46c;hp=46d8b0a039965cf68fb27a3b88b3c23a1e34d912 doc: Additional notes on sp_last_error_{code,message}. --- diff --git a/libserialport.h.in b/libserialport.h.in index a4bd00e..c8defbe 100644 --- a/libserialport.h.in +++ b/libserialport.h.in @@ -1335,6 +1335,8 @@ enum sp_return sp_end_break(struct sp_port *port); * * In order to obtain the correct result, this function should be called * straight after the failure, before executing any other system operations. + * The result is thread-specific, and only valid when called immediately + * after a previous call returning SP_ERR_FAIL. * * @return The system's numeric code for the error that caused the last * operation to fail. @@ -1348,6 +1350,8 @@ int sp_last_error_code(void); * * In order to obtain the correct result, this function should be called * straight after the failure, before executing other system operations. + * The result is thread-specific, and only valid when called immediately + * after a previous call returning SP_ERR_FAIL. * * @return The system's message for the error that caused the last * operation to fail. This string may be allocated by the function,