[Solved] Problem with serial_struct
Posted: Thu Feb 28, 2013 10:57 am
Hi,
I have to call ioctl_() withDuring the search for my thread bug, I enabled the Purifier.
And found a 'procedure stack corruption' at the call ioctl_()
The linux serial_struct
is translated to:In my opinion it's Ok.
But:
SizeOf() PB: 58
SizeOf() C: 60
Aghhh
I need
Maybe this helps someone else.
Bernd
I have to call ioctl_() with
Code: Select all
#TIOCGSERIAL = $541E
#TIOCSSERIAL = $541FAnd found a 'procedure stack corruption' at the call ioctl_()
The linux serial_struct
Code: Select all
struct serial_struct {
int type;
int line;
unsigned int port;
int irq;
int flags;
int xmit_fifo_size;
int custom_divisor;
int baud_base;
unsigned short close_delay;
char io_type;
char reserved_char[1];
int hub6;
unsigned short closing_wait; /* time to wait before closing */
unsigned short closing_wait2; /* no longer used... */
unsigned char *iomem_base;
unsigned short iomem_reg_shift;
unsigned int port_high;
unsigned long iomap_base; /* cookie passed into ioremap */
}Code: Select all
Structure serial_struct
type.i
line.i
port.i
irq.i
flags.i
xmit_fifo_size.i
custom_divisor.i
baud_base.i
close_delay.u
io_type.b
reserved_char.b[1]
hub6.i
closing_wait.u
closing_wait2.u
*iomem_base
iomem_reg_shift.u
port_high.i
iomap_base.l
EndStructureBut:
SizeOf() PB: 58
SizeOf() C: 60
Aghhh
I need
Code: Select all
Structure serial_struct Align 4Bernd