Changeset 55b77d9 in mainline for kernel/generic/src/console/console.c


Ignore:
Timestamp:
2011-06-17T20:39:16Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8f164724
Parents:
98caf49
Message:

Separate list_t typedef from link_t (kernel part).

  • list_t represents lists
  • Use list_first(), list_last(), list_empty() where appropriate
  • Use list_foreach() where possible
  • Replace improper uses of list_prepend() with list_insert_after()
  • Replace improper uses of list_append() with list_insert_before()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/console/console.c

    r98caf49 r55b77d9  
    124124static void stdout_write(outdev_t *dev, wchar_t ch, bool silent)
    125125{
    126         link_t *cur;
    127        
    128         for (cur = dev->list.next; cur != &dev->list; cur = cur->next) {
     126        list_foreach(dev->list, cur) {
    129127                outdev_t *sink = list_get_instance(cur, outdev_t, link);
    130128                if ((sink) && (sink->op->write))
     
    135133static void stdout_redraw(outdev_t *dev)
    136134{
    137         link_t *cur;
    138        
    139         for (cur = dev->list.next; cur != &dev->list; cur = cur->next) {
     135        list_foreach(dev->list, cur) {
    140136                outdev_t *sink = list_get_instance(cur, outdev_t, link);
    141137                if ((sink) && (sink->op->redraw))
Note: See TracChangeset for help on using the changeset viewer.