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

Comparing BasiliskII/src/BeOS/serial_beos.cpp (file contents):
Revision 1.1 by cebix, 1999-10-03T14:16:25Z vs.
Revision 1.8 by cebix, 2004-01-12T15:29:23Z

# Line 1 | Line 1
1   /*
2   *  serial_beos.cpp - Serial device driver, BeOS specific stuff
3   *
4 < *  Basilisk II (C) 1997-1999 Christian Bauer
4 > *  Basilisk II (C) 1997-2004 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 76 | Line 76 | public:
76                          suspend_thread(input_thread);   // Unblock thread
77                          snooze(1000);
78                          resume_thread(input_thread);
79 <                        wait_for_thread(input_thread, &l);
79 >                        while (wait_for_thread(input_thread, &l) == B_INTERRUPTED) ;
80                  }
81                  if (output_thread > 0) {
82                          send_data(output_thread, CMD_QUIT, NULL, 0);
83                          suspend_thread(output_thread);  // Unblock thread
84                          snooze(1000);
85                          resume_thread(output_thread);
86 <                        wait_for_thread(output_thread, &l);
86 >                        while (wait_for_thread(output_thread, &l) == B_INTERRUPTED) ;
87                  }
88                  acquire_sem(device_sem);
89                  delete_sem(device_sem);
90                  delete device;
91          }
92  
93 <        virtual int16 Open(uint16 config);
94 <        virtual int16 PrimeIn(uint32 pb, uint32 dce);
95 <        virtual int16 PrimeOut(uint32 pb, uint32 dce);
96 <        virtual int16 Control(uint32 pb, uint32 dce, uint16 code);
97 <        virtual int16 Status(uint32 pb, uint32 dce, uint16 code);
98 <        virtual int16 Close(void);
93 >        virtual int16 open(uint16 config);
94 >        virtual int16 prime_in(uint32 pb, uint32 dce);
95 >        virtual int16 prime_out(uint32 pb, uint32 dce);
96 >        virtual int16 control(uint32 pb, uint32 dce, uint16 code);
97 >        virtual int16 status(uint32 pb, uint32 dce, uint16 code);
98 >        virtual int16 close(void);
99  
100   private:
101          bool configure(uint16 config);
# Line 154 | Line 154 | void SerialExit(void)
154   *  Open serial port
155   */
156  
157 < int16 BeSERDPort::Open(uint16 config)
157 > int16 BeSERDPort::open(uint16 config)
158   {
159          // Don't open NULL name devices
160          if (device_name == NULL)
# Line 169 | Line 169 | int16 BeSERDPort::Open(uint16 config)
169          if (is_parallel) {
170                  char name[256];
171                  sprintf(name, "/dev/parallel/%s", device_name);
172 <                fd = open(name, O_WRONLY);
172 >                fd = ::open(name, O_WRONLY);
173                  if (fd < 0) {
174                          release_sem(device_sem);
175                          return openErr;
# Line 204 | Line 204 | int16 BeSERDPort::Open(uint16 config)
204   *  Read data from port
205   */
206  
207 < int16 BeSERDPort::PrimeIn(uint32 pb, uint32 dce)
207 > int16 BeSERDPort::prime_in(uint32 pb, uint32 dce)
208   {
209          // Send input command to input_thread
210          read_done = false;
# Line 221 | Line 221 | int16 BeSERDPort::PrimeIn(uint32 pb, uin
221   *  Write data to port
222   */
223  
224 < int16 BeSERDPort::PrimeOut(uint32 pb, uint32 dce)
224 > int16 BeSERDPort::prime_out(uint32 pb, uint32 dce)
225   {
226          // Send output command to output_thread
227          write_done = false;
# Line 238 | Line 238 | int16 BeSERDPort::PrimeOut(uint32 pb, ui
238   *      Control calls
239   */
240  
241 < int16 BeSERDPort::Control(uint32 pb, uint32 dce, uint16 code)
241 > int16 BeSERDPort::control(uint32 pb, uint32 dce, uint16 code)
242   {
243          switch (code) {
244                  case 1:                 // KillIO
# Line 433 | Line 433 | int16 BeSERDPort::Control(uint32 pb, uin
433   *      Status calls
434   */
435  
436 < int16 BeSERDPort::Status(uint32 pb, uint32 dce, uint16 code)
436 > int16 BeSERDPort::status(uint32 pb, uint32 dce, uint16 code)
437   {
438          switch (code) {
439                  case kSERDInputCount:
# Line 485 | Line 485 | int16 BeSERDPort::Status(uint32 pb, uint
485   *      Close serial port
486   */
487  
488 < int16 BeSERDPort::Close()
488 > int16 BeSERDPort::close()
489   {
490          // Kill threads
491          status_t l;
# Line 513 | Line 513 | int16 BeSERDPort::Close()
513          // Close port
514          while (acquire_sem(device_sem) == B_INTERRUPTED) ;
515          if (is_parallel) {
516 <                close(fd);
516 >                ::close(fd);
517                  fd = -1;
518          } else {
519                  if (drop_dtr_on_close)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines