Changeset ebbc8a74 in mainline for uspace/srv/logger/namespace.c


Ignore:
Timestamp:
2012-08-16T15:44:27Z (12 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d6ddeb7
Parents:
dc5aa568
Message:

Remove premature optimizations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/logger/namespace.c

    rdc5aa568 rebbc8a74  
    5151        fibril_mutex_t guard;
    5252        size_t writers_count;
    53         fibril_condvar_t level_changed_cv;
    5453        FILE *logfile;
    5554        log_level_t level;
     
    135134
    136135        fibril_mutex_initialize(&namespace->guard);
    137         fibril_condvar_initialize(&namespace->level_changed_cv);
    138136        namespace->writers_count = 0;
    139137        link_initialize(&namespace->link);
     
    228226                namespace->context[i].level = level;
    229227        }
    230         fibril_condvar_broadcast(&namespace->level_changed_cv);
    231228        fibril_mutex_unlock(&namespace->guard);
    232229
     
    277274                        namespace->context[i].level = new_level;
    278275                        rc = EOK;
    279                         fibril_condvar_broadcast(&namespace->level_changed_cv);
    280276                        goto leave;
    281277                }
     
    287283        return rc;
    288284}
    289 
    290 void namespace_wait_for_reader_change(logging_namespace_t *namespace, bool *has_reader_now)
    291 {
    292         fibril_mutex_lock(&namespace->guard);
    293         // FIXME: properly watch for state change
    294         fibril_condvar_wait(&namespace->level_changed_cv, &namespace->guard);
    295         *has_reader_now = true;
    296         fibril_mutex_unlock(&namespace->guard);
    297 }
    298 
    299285
    300286void namespace_add_message(logging_namespace_t *namespace, const char *message, sysarg_t context, log_level_t level)
Note: See TracChangeset for help on using the changeset viewer.