SCM

[#306751] sanei-thread with pthreads on 64 bit

View Trackers | Bugs | Export CSV

Date:
2007-11-13 19:56
Priority:
3
State:
Closed
Submitted by:
Mattias Ellert (ellert-guest)
Assigned to:
Gerhard Jaeger (gja-guest)
Category:
sanei
Group:
None
Resolution:
Fixed
Summary:
sanei-thread with pthreads on 64 bit

Detailed description
sanei-thread used an int as "PID" for both the fork and pthread version. This works on 32 bit platforms where both pid_t, pthread_t and int are 32 bit numbers.

However on 64 bit platforms pid_t and int are 32 bit numbers, but pthread_t is a 64 bit number. In this case the pthread_t does not fit into the sanei_thread "PID".

This should be fixed in a non-intrucive way...

Followups: Sort comments antichronologically

Message
Date: 2007-11-15 08:18
Sender: Gerhard Jaeger

Hmmm, guess you are right...
But this touches all backends using the sanei_thread stuff:
> grep -l sanei_thread_init *.c
agfafocus.c
artec_eplus48u.c
avision.c
coolscan.c
hp.c
hp3500.c
microtek2.c
mustek.c
pixma.c
plustek.c
plustek_pp.c
snapscan.c
sp15c.c
tamarack.c
test.c
u12.c
umax.c
Date: 2008-02-17 19:45
Sender: Mattias Ellert

Hi!

Here is a patch for this problem.
As far as I can tell it only breaks binary compatibility for 64bit compiled with
pthreads - and that is what was broken. So I think it is quite safe to apply.
Date: 2008-05-15 12:51
Sender: Mattias Ellert

The proposed patch has been applied.

Attached Files:

Attachments:
Size Name Date By Download
23 KiBsanei-thread.patch2008-02-17 19:45ellert-guestsanei-thread.patch

Changes:

Field Old Value Date By
close_date2008-05-15 12:512008-05-15 12:51ellert-guest
ResolutionNone2008-05-15 12:51ellert-guest
status_idOpen2008-05-15 12:51ellert-guest
File Added2399: sanei-thread.patch2008-02-17 19:45ellert-guest
assigned_tonone2007-11-15 08:18gja-guest
Powered By FusionForge