mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Re: test10-pre7
@ 2000-10-31 16:15 Vladislav Malyshkin
  2000-10-31 16:45 ` test10-pre7 Peter Samuelson
  0 siblings, 1 reply; 12+ messages in thread
From: Vladislav Malyshkin @ 2000-10-31 16:15 UTC (permalink / raw)
  To: peter, R.E.Wolff, torvalds, linux-kernel

Hi, Peter,
You can easily remove duplicates in object files without sorting. You
can just use a shell written function.
This is an example of such function (bash written).
It removes the duplicates from the argument and prints the result to
stdout.
No sorting used.

# This function removes duplicates from a string
remove_duplicates() {
 if [ $# -ne 1 ]; then
  echo "usage: remove_duplicates string" 1>&2
  exit 1
 fi
 str=""
 for tmpvar1 in $1 ; do
  flag_found=0
  for tmpvar2 in $str ; do
   if [ "${tmpvar1}" = "${tmpvar2}" ]; then
    flag_found=1
    break
   fi
  done
  if [ "${flag_found}" -eq 0 ]; then
    str="${str} ${tmpvar1}"
  fi
 done
 echo "${str}"
 return 0
}

# This is a usage example.
x="`remove_duplicates \"a b c d e a b c\"`"
echo "$x"

Vladislav

---Peter Samuelson wrote:
>> And it should make all this FIRST/LAST object file mockery a total
>> non-issue, because the whole concept turns out to be completely
>> unnecessary.
>>
>> Is there anything that makes this more complex than what I've
>> outlined above?
>
>One thing. The main benefit of $(sort), which I haven't heard you
>address yet, is to remove duplicate files. Think about 8390.o, and how
>many net drivers require it. There are two ways to handle this:
>
>  obj-$(CONFIG_WD80x3) += wd.o 8390.o
>  obj-$(CONFIG_EL2) += 3c503.o 8390.o
>  obj-$(CONFIG_NE2000) += ne.o 8390.o
>  obj-$(CONFIG_NE2_MCA) += ne2.o 8390.o
>  obj-$(CONFIG_HPLAN) += hp.o 8390.o

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: Linus's poll variation
@ 2000-11-01 16:29 Dan Kegel
  0 siblings, 0 replies; 12+ messages in thread
From: Dan Kegel @ 2000-11-01 16:29 UTC (permalink / raw)
  To: linux-kernel, Lyle Coder

Lyle asked:
> Is someone working on Linus's poll variation discussed in this list a week ago? 

I think the interface still needs some discussion.
The interface Linus proposed is IMHO oriented towards ease of 
kernel implementation, and doesn't appear to be easy to use
for all applications.
cf. recent posts by John Gardiner Myers <jgmyers@netscape.com>
e.g. 
http://boudicca.tux.org/hypermail/linux-kernel/2000week44/0966.html
http://boudicca.tux.org/hypermail/linux-kernel/2000week45/0212.html
IMHO kqueue()/kevent() is closer to what the apps want.

Mike Jagdis, however, has done some work on speeding up the
existing poll() system call, and has an eye on implementing
the /dev/poll interface.  See
http://boudicca.tux.org/hypermail/linux-kernel/2000week45/0266.html
- Dan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2000-11-03 16:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-31 16:15 test10-pre7 Vladislav Malyshkin
2000-10-31 16:45 ` test10-pre7 Peter Samuelson
2000-10-31 18:07   ` test10-pre7 Vladislav Malyshkin
2000-10-31 18:38     ` test10-pre7 Linus Torvalds
2000-10-31 19:16       ` test10-pre7 H. Peter Anvin
2000-11-01  3:15         ` test10-pre7 Peter Samuelson
2000-11-01  6:11           ` test10-pre7 H. Peter Anvin
2000-11-01  6:19             ` Linus's poll variation Lyle Coder
2000-11-01  6:31             ` test10-pre7 Peter Samuelson
2000-11-01  7:42     ` test10-pre7 Peter Samuelson
2000-11-03 16:26       ` test10-pre7 Vladislav Malyshkin
2000-11-01 16:29 Linus's poll variation Dan Kegel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®