Add new streams to a hash-list based on their names
commit52df775e6235b81ddb44f885214f40ea562a61ea
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 19 Apr 2011 20:02:08 +0000 (19 13:02 -0700)
committerChristopher Li <sparse@chrisli.org>
Tue, 19 Apr 2011 20:02:08 +0000 (19 13:02 -0700)
treec0362ece9476706bb527ad498d323c229b61fa5f
parentaaff080449ebcb66553ebf5b512f737b6191f339
Add new streams to a hash-list based on their names

This trivially creates a small (currently 64-entry) hash table for
stream numbers, so that you can look up a stream by its name.

Nothing currently uses it, but the next commit will teach
"already_tokenized()" to look up the stream by name, allowing us to
avoid the "walk over each stream we've seen" loop.  The silly string
compare in that loop can take a lot of CPU time.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Christopher Li <sparse@chrisli.org>
token.h
tokenize.c