What is a "sentient being" in Tibetan Buddhism? The answer to this question seems to depend on what school one talks about. So my question is about Mahayana Buddhism, more specifically Tibetan Madhyamaka Buddhist schools.

I kind of wonder where the line is drawn between beings that are sentient and beings that are not. How about f.ex. corals, algae, amoeba, crill and living creatures like that. 

As far as I can understand (which is probably not very far) this has got to do with whether the being has consciousness/mind or not. Is that so?  Maybe the question should be "what does it mean to say that a being is  conscious or has a mind? 

Is there a generally accepted definition of what a sentient being is? Anywhere in the suttas the Buddha is talking about this?
Purbuchok. in Explanation of the Presentation of Objects and Object-Posessors as well as Awarenesses and Knowers:


  With regard to persons, the definition of something’s being
  a person is: a being imputed in dependence upon any of its five
  aggregates.
  
  Self, I, person, and being are synonymous. An illustration is a being
  who possesses a basis of one of the three realms.



That which is both a person and is not an arya buddha is a sentient being. An arya budha is a person, but not a sentient being.

From Geshe Gyaltsen's commentary to Maitreya's Sublime Continuum:


  Person pervades all sentient beings and sentient beings pervade all
  ordinary beings, or ordinary persons. There are therefore three
  possibilities. Therefore the broader category is person, the person
  being someone with a mind, whereby all sentient beings and arya
  buddhas are included. Arya buddha is the buddha as a person.



According to the so-called Wheel of Life (Skt. bhavacakka; Tib. srid pa'i 'khor lo) there are six realms, that is six types of rebirth, six types of sentient beings. It is thus generally accepted that the are the six : hell beings, hungry ghosts, animals, humans, demi-gods and gods. All other existent (minerals, plants, fungus, my carpet, my cup of tea) are not sentient beings. Then, suffice it to establish that bacteria are fungus in order to establish they are not sentient beings, but it goes already beyond the scope of Tibetan treatises.

The wheel is talked of in the tales called Divine narratives (Skt. Divyāvadāna).