Unlike R5, receive_data() could return an error code under Haiku - this

can now only happen if the thread is killed.
_user_receive_data() will now longer pass B_CAN_INTERRUPT to receive_data(),
but B_KILL_CAN_INTERRUPT - this should fix the problem Stefano experienced
with this function, even if I couldn't reproduce it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13075 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-06-12 11:14:37 +00:00
parent 96b5c85819
commit 183dee22cb
4 changed files with 18 additions and 11 deletions
+5 -3
View File
@@ -320,8 +320,9 @@ find_thread(const char *name) {
extern thread_id find_thread(const char *name);
#endif
extern status_t send_data(thread_id thread, int32 code, const void *buffer, size_t buffer_size);
extern status_t receive_data(thread_id *sender, void *buffer, size_t buffer_size);
extern status_t send_data(thread_id thread, int32 code, const void *buffer,
size_t bufferSize);
extern int32 receive_data(thread_id *sender, void *buffer, size_t bufferSize);
extern bool has_data(thread_id thread);
extern status_t snooze(bigtime_t amount);
@@ -330,7 +331,8 @@ extern status_t snooze_until(bigtime_t time, int timeBase);
/* system private, use macros instead */
extern status_t _get_thread_info(thread_id id, thread_info *info, size_t size);
extern status_t _get_next_thread_info(team_id team, int32 *cookie, thread_info *info, size_t size);
extern status_t _get_next_thread_info(team_id team, int32 *cookie,
thread_info *info, size_t size);
#define get_thread_info(id, info) \
_get_thread_info((id), (info), sizeof(*(info)))