Changeset f6bc83a in mainline
- Timestamp:
- 2012-07-04T13:21:52Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ef5be68
- Parents:
- e1eda1e9
- Location:
- uspace
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/io/log.c
re1eda1e9 rf6bc83a 87 87 async_exchange_end(exchange); 88 88 89 /* 90 * Getting ENAK means no-one wants our message. That is not an 91 * error at all. 92 */ 93 if (rc == ENAK) 94 rc = EOK; 95 89 96 if (rc != EOK) { 90 97 return rc; -
uspace/srv/logger/logger.h
re1eda1e9 rf6bc83a 65 65 void namespace_writer_detach(logging_namespace_t *); 66 66 67 bool namespace_has_reader(logging_namespace_t *); 67 68 void namespace_add_message(logging_namespace_t *, const char *, log_level_t); 68 69 log_message_t *namespace_get_next_message(logging_namespace_t *); -
uspace/srv/logger/main.c
re1eda1e9 rf6bc83a 74 74 static int handle_receive_message(logging_namespace_t *namespace, int level) 75 75 { 76 bool skip_message = (level > DEFAULT_LOGGING_LEVEL) || !namespace_has_reader(namespace); 77 if (skip_message) { 78 /* Abort the actual message buffer transfer. */ 79 ipc_callid_t callid; 80 size_t size; 81 int rc = ENAK; 82 if (!async_data_write_receive(&callid, &size)) 83 rc = EINVAL; 84 85 async_answer_0(callid, rc); 86 return rc; 87 } 88 76 89 void *message; 77 90 int rc = async_data_write_accept(&message, true, 0, 0, 0, NULL); -
uspace/srv/logger/namespace.c
re1eda1e9 rf6bc83a 193 193 } 194 194 195 bool namespace_has_reader(logging_namespace_t *namespace) 196 { 197 fibril_mutex_lock(&namespace->guard); 198 bool has_reader = namespace->has_reader; 199 fibril_mutex_unlock(&namespace->guard); 200 return has_reader; 201 } 195 202 196 203
Note:
See TracChangeset
for help on using the changeset viewer.