summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/srand48.c
blob: 30deb0e10756f546bdc149fbc78ec44862bb216e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*	$NetBSD: srand48.c,v 1.6 2000/01/22 22:19:20 mycroft Exp $	*/

/*
 * Copyright (c) 1993 Martin Birgmeier
 * All rights reserved.
 *
 * You may redistribute unmodified or modified versions of this source
 * code provided that the above copyright notice and this and the
 * following conditions are retained.
 *
 * This software is provided ``as is'', and comes with no warranties
 * of any kind. I shall in no event be liable for anything that happens
 * to anyone/anything when using this software.
 */

#include "namespace.h"
#include "rand48.h"

#ifdef __weak_alias
__weak_alias(srand48,_srand48)
#endif

void
srand48(long seed)
{
	__rand48_seed[0] = RAND48_SEED_0;
	__rand48_seed[1] = (unsigned short) seed;
	__rand48_seed[2] = (unsigned short) ((unsigned long)seed >> 16);
	__rand48_mult[0] = RAND48_MULT_0;
	__rand48_mult[1] = RAND48_MULT_1;
	__rand48_mult[2] = RAND48_MULT_2;
	__rand48_add = RAND48_ADD;
}
over-highlight'> - rename variables for readability after device_t/softc split - use proper pointer types No binary changes. 2009-01-25Split device_t from wd33c93_softc. Reviewed by cube; tested on sgimipsbjh21 by tsutsui. 2009-01-20Convert more printfs to aprint_* and use the latter more consistently.bjh21 2008-04-08use aprint_*_dev and device_xnamecegger 2007-10-19machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.had 2007-07-09Merge some of the less invasive changes from the vmlocking branch:ad - kthread, callout, devsw API changes - select()/poll() improvements - miscellaneous MT safety improvements 2007-05-21Fix comments about the cf_flags layout and use macros to test whetherrumble tags, sync, and disconnect/reconnect are to be disabled or not. 2007-05-21Check in a workaround before I lose or forget about it:rumble My SGI issued IBM DORS-32160 will respond to every message with a sync negotiation (even IDENTIFY) until it gets a response it likes (and it definitely doesn't like async). Unfortunately, this locks us into an endless loop after sending IDENTIFY, since the device responds with a SYNC negotiation that we refuse to accept. This refusal results in a new target-initiated sync negotiation, and so on... To work around this, permit negotiating sync mode on an unexpected target-initiated sync negotiation. 2007-05-08Report whether we're using DMA and what type on attach, since I keep losingrumble track while testing. 2007-05-08The maximum FIFO depth on old WD33C93 parts is only 5, not 12 as on 93A andrumble 93B. However, there appear to be issues using the maximum of 5 on old parts, so 4 is it. 2007-05-08Enable Fast SCSI transfers for WD33C93B parts with appropriate inputrumble clocks. My Seagate ST32430N now sees about 50% greater throughput (about 97% as fast as IRIX can push it). However, there appear to be other performance issues with the driver as other disks perform significantly worse than they should, with or without this change. Reviewed by bjh21. Tested on my Indy and Challenge S. 2007-03-12Pass an ipl argument to pool_init/POOL_INIT to be used when initializingad the pool's lock. 2007-03-05Cast to char* before doing pointer arithmetic.he 2006-10-01Allow wd33c93 attachments to choose what DMA mode it should use, and arrangebjh21 to use burst mode on sec(4), which makes it slightly but significantly faster. 2006-09-26Merge my bjh21-wd33c93 branch. This improves message handling in generalbjh21 and sync negotiation in particular. Tested on sgimips (thanks to Manuel Bouyer) and acorn26 (with my still-unfinished driver for the Acorn SCSI Expansion Card). 2006-09-05Make this work with timecounters.rumble 2006-08-27Revert revision 1.4: it seems to have caused serious problems on sgimips,bjh21 so I should probably leave it until I get my Indy going. 2006-08-27Use symbolic names for CSR values after reset.bjh21 2006-08-26When receiving a SCSI message, it's important not to deassert ACK on the lastbjh21 byte until we've worked out what to do with the message, since if we plan to reply to it we have to assert ATN before deasserting ACK. Implement this. 2006-08-26Use standard MSG_IS1BYTE, MSG_IS2BYTE, and MSG_ISEXTENDED macros ratherbjh21 than rolling our own. 2006-08-26Use the 'z' size modifier when printfing size_t, so that GCC doesn't complainbjh21 on systems were size_t isn't unsigned int. 2006-08-26Move the sgimips "sbic" driver from arch/sgimips/hpc/sbic.c tobjh21 dev/ic/wd33c93.c. This may not be the best WD33C93 driver we've got, but it's the most recently worked on and probably the most portable, so it seems like a good basis for further work (and in particular an acorn26 driver for the Acorn SCSI card). There's no functional change in this commit, and sgimips kernels still compile.