aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/sched.h
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-02 02:33:04 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-05-02 02:33:04 +0000
commit748f3cf4565a694398bca176faa409e0320c8a68 (patch)
treeee050a5776fcef01d006a9c4e447f3240686014f /include/asterisk/sched.h
parent927870cd7d4ae9cda8f269d1ca36373704999a8c (diff)
Add attributes to various API calls, to help track down bugs (and remove a deprecated function)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@115157 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/sched.h')
-rw-r--r--include/asterisk/sched.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/include/asterisk/sched.h b/include/asterisk/sched.h
index 21a1740c3..ed855d562 100644
--- a/include/asterisk/sched.h
+++ b/include/asterisk/sched.h
@@ -155,7 +155,7 @@ char *ast_sched_report(struct sched_context *con, char *buf, int bufsiz, struct
* \param data data to pass to the callback
* \return Returns a schedule item ID on success, -1 on failure
*/
-int ast_sched_add(struct sched_context *con, int when, ast_sched_cb callback, const void *data);
+int ast_sched_add(struct sched_context *con, int when, ast_sched_cb callback, const void *data) __attribute__((warn_unused_result));
/*!
* \brief replace a scheduler entry
@@ -168,7 +168,7 @@ int ast_sched_add(struct sched_context *con, int when, ast_sched_cb callback, co
* \retval -1 failure
* \retval otherwise, returns scheduled item ID
*/
-int ast_sched_replace(int old_id, struct sched_context *con, int when, ast_sched_cb callback, const void *data);
+int ast_sched_replace(int old_id, struct sched_context *con, int when, ast_sched_cb callback, const void *data) __attribute__((warn_unused_result));
/*!Adds a scheduled event with rescheduling support
* \param con Scheduler context to add
@@ -183,7 +183,7 @@ int ast_sched_replace(int old_id, struct sched_context *con, int when, ast_sched
* If callback returns 0, no further events will be re-scheduled
* \return Returns a schedule item ID on success, -1 on failure
*/
-int ast_sched_add_variable(struct sched_context *con, int when, ast_sched_cb callback, const void *data, int variable);
+int ast_sched_add_variable(struct sched_context *con, int when, ast_sched_cb callback, const void *data, int variable) __attribute__((warn_unused_result));
/*!
* \brief replace a scheduler entry
@@ -196,7 +196,7 @@ int ast_sched_add_variable(struct sched_context *con, int when, ast_sched_cb cal
* \retval -1 failure
* \retval otherwise, returns scheduled item ID
*/
-int ast_sched_replace_variable(int old_id, struct sched_context *con, int when, ast_sched_cb callback, const void *data, int variable);
+int ast_sched_replace_variable(int old_id, struct sched_context *con, int when, ast_sched_cb callback, const void *data, int variable) __attribute__((warn_unused_result));
/*! \brief Find a sched structure and return the data field associated with it.
@@ -216,8 +216,7 @@ const void *ast_sched_find_data(struct sched_context *con, int id);
* \param id ID of the scheduled item to delete
* \return Returns 0 on success, -1 on failure
*/
-
-int ast_sched_del(struct sched_context *con, int id);
+int ast_sched_del(struct sched_context *con, int id) __attribute__((warn_unused_result));
/*! \brief Determines number of seconds until the next outstanding event to take place
* Determine the number of seconds until the next outstanding event
@@ -228,7 +227,7 @@ int ast_sched_del(struct sched_context *con, int id);
* \return Returns "-1" if there is nothing there are no scheduled events
* (and thus the poll should not timeout)
*/
-int ast_sched_wait(struct sched_context *con);
+int ast_sched_wait(struct sched_context *con) __attribute__((warn_unused_result));
/*! \brief Runs the queue
* \param con Scheduling context to run