Changeset f9061b4 in mainline for uspace/app/klog/klog.c


Ignore:
Timestamp:
2011-05-16T13:38:04Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4e1a2f5
Parents:
e0f52bf
Message:

add kernel event notification masking (currently used only for EVENT_KLOG)
improve kernel event notification API

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/klog/klog.c

    re0f52bf rf9061b4  
    7474                fsync(fileno(log));
    7575        }
     76       
     77        event_unmask(EVENT_KLOG);
    7678}
    7779
     
    111113        }
    112114       
    113         rc = event_subscribe(EVENT_KLOG, 0);
    114         if (rc != EOK) {
    115                 fprintf(stderr, "%s: Unable to register klog notifications\n",
    116                     NAME);
    117                 return rc;
    118         }
    119        
    120115        log = fopen(LOG_FNAME, "a");
    121116        if (log == NULL)
     
    124119       
    125120        async_set_interrupt_received(interrupt_received);
     121        rc = event_subscribe(EVENT_KLOG, 0);
     122        if (rc != EOK) {
     123                fclose(log);
     124                fprintf(stderr, "%s: Unable to register klog notifications\n",
     125                    NAME);
     126                return rc;
     127        }
     128       
     129        event_unmask(EVENT_KLOG);
     130       
    126131        klog_update();
    127132        async_manager();
Note: See TracChangeset for help on using the changeset viewer.