[Gems-users] Ruby 1.4 magic_instruction_callback function


Date: Thu, 22 Mar 2007 14:34:46 -0400
From: "James Poe" <gemsmaillist@xxxxxxxxx>
Subject: [Gems-users] Ruby 1.4 magic_instruction_callback function
In the Ruby 1.4 release, the bounds for beginning and committing transactions has been changed from 20 and 40 to 1024 and 2048 respectively in the magic_instruction_callback function within the commands.C file.  These larger numbers, however, result in an bounds problem in the assembler when combined with the 16 bit left shift in the suggested assembly for starting and ending transactions.

One potential way to resolve this issue is to revert the transaction begin/commit bounds in the commands.C file back to their original 20/40 values.  Instead of this, I was wondering if it is correct to simply NOT shift the id value left by 16 bits for transaction ids (>1025)?  There is a check in the commands.C file that only shifts back right values that have been shifted left. 

What was the original reason for shifting magic instructions values left 16, and is it OK to NOT perform this shift when passing id's for begin/end transactions?
[← Prev in Thread] Current Thread [Next in Thread→]