ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/Unix/serial_unix.cpp
(Generate patch)

Comparing BasiliskII/src/Unix/serial_unix.cpp (file contents):
Revision 1.6 by cebix, 2000-09-25T17:54:01Z vs.
Revision 1.10 by cebix, 2002-02-07T16:10:55Z

# Line 1 | Line 1
1   /*
2   *  serial_unix.cpp - Serial device driver, Unix specific stuff
3   *
4 < *  Basilisk II (C) 1997-2000 Christian Bauer
4 > *  Basilisk II (C) 1997-2002 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 67 | Line 67 | public:
67                  fd = -1;
68                  input_thread_active = output_thread_active = false;
69  
70 <                pthread_attr_init(&thread_attr);
71 < #if defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
72 <                if (geteuid() == 0) {
73 <                        pthread_attr_setinheritsched(&thread_attr, PTHREAD_EXPLICIT_SCHED);
74 <                        pthread_attr_setschedpolicy(&thread_attr, SCHED_FIFO);
75 <                        struct sched_param fifo_param;
76 <                        fifo_param.sched_priority = (sched_get_priority_min(SCHED_FIFO) + sched_get_priority_max(SCHED_FIFO)) / 2 + 2;
77 <                        pthread_attr_setschedparam(&thread_attr, &fifo_param);
78 <                }
79 < #endif
70 >                Set_pthread_attr(&thread_attr, 2);
71          }
72  
73          virtual ~XSERDPort()
# Line 208 | Line 199 | int16 XSERDPort::open(uint16 config)
199          configure(config);
200  
201          // Start input/output threads
202 +        input_thread_cancel = false;
203 +        output_thread_cancel = false;
204          if (sem_init(&input_signal, 0, 0) < 0)
205                  goto open_error;
206          if (sem_init(&output_signal, 0, 0) < 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines